mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 11:37:44 +00:00
fix Rust 1.59 clippy lints
This commit is contained in:
parent
c9be7ccf89
commit
722c5d268f
3 changed files with 3 additions and 7 deletions
|
@ -204,7 +204,7 @@ fn write_options(w: &mut impl Write, app: &App) -> io::Result<()> {
|
||||||
writeln!(
|
writeln!(
|
||||||
w,
|
w,
|
||||||
"<dd>\n\n{}\n\n</dd>",
|
"<dd>\n\n{}\n\n</dd>",
|
||||||
arg.get_help().unwrap_or_default().replace("\n", "<br />")
|
arg.get_help().unwrap_or_default().replace('\n', "<br />")
|
||||||
)?;
|
)?;
|
||||||
}
|
}
|
||||||
writeln!(w, "</dl>\n")
|
writeln!(w, "</dl>\n")
|
||||||
|
|
|
@ -1644,11 +1644,7 @@ fn test_ls_indicator_style() {
|
||||||
// Same test as above, but with the alternate flags.
|
// Same test as above, but with the alternate flags.
|
||||||
let options = vec!["--classify", "--file-type", "-p"];
|
let options = vec!["--classify", "--file-type", "-p"];
|
||||||
for opt in options {
|
for opt in options {
|
||||||
scene
|
scene.ucmd().arg(opt).succeeds().stdout_contains(&"/");
|
||||||
.ucmd()
|
|
||||||
.arg(opt.to_string())
|
|
||||||
.succeeds()
|
|
||||||
.stdout_contains(&"/");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Classify and File-Type all contain indicators for pipes and links.
|
// Classify and File-Type all contain indicators for pipes and links.
|
||||||
|
|
|
@ -64,7 +64,7 @@ const TESTS: [TestCase; 10] = [
|
||||||
#[allow(clippy::needless_lifetimes)]
|
#[allow(clippy::needless_lifetimes)]
|
||||||
fn convert_path<'a>(path: &'a str) -> Cow<'a, str> {
|
fn convert_path<'a>(path: &'a str) -> Cow<'a, str> {
|
||||||
#[cfg(windows)]
|
#[cfg(windows)]
|
||||||
return path.replace("/", "\\").into();
|
return path.replace('/', "\\").into();
|
||||||
#[cfg(not(windows))]
|
#[cfg(not(windows))]
|
||||||
return path.into();
|
return path.into();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue