Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -419,10 +419,11 @@ uu_checksum_common = { version = "0.6.0", path = "src/uu/checksum_common" }
uutests = { version = "0.6.0", package = "uutests", path = "tests/uutests" }

[dependencies]
clap.workspace = true
clap_complete = { workspace = true, optional = true }
clap_mangen = { workspace = true, optional = true }
clap.workspace = true
fluent-syntax = { workspace = true, optional = true }
itertools.workspace = true
phf.workspace = true
selinux = { workspace = true, optional = true }
textwrap.workspace = true
Expand Down
6 changes: 2 additions & 4 deletions src/bin/coreutils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

use clap::Command;
use coreutils::validation;
use itertools::Itertools as _;
use std::cmp;
use std::ffi::OsString;
use std::io::{self, Write};
Expand All @@ -28,10 +29,7 @@ fn usage<T>(utils: &UtilityMap<T>, name: &str) {
println!("Options:");
println!(" --list lists all defined functions, one per row\n");
println!("Currently defined functions:\n");
#[allow(clippy::map_clone)]
let mut utils: Vec<&str> = utils.keys().map(|&s| s).collect();
utils.sort_unstable();
let display_list = utils.join(", ");
let display_list = utils.keys().copied().sorted_unstable().join(", ");
let width = cmp::min(textwrap::termwidth(), 100) - 4 * 2; // (opinion/heuristic) max 100 chars wide with 4 character side indentions
println!(
"{}",
Expand Down
Loading