mirror of
https://github.com/uutils/coreutils
synced 2024-11-16 01:38:04 +00:00
Merge pull request #3189 from tertsdiepraam/clippy-1.59
Rust 1.59 Clippy lints
This commit is contained in:
commit
629e1f7c4e
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!(
|
||||
w,
|
||||
"<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")
|
||||
|
|
|
@ -1644,11 +1644,7 @@ fn test_ls_indicator_style() {
|
|||
// Same test as above, but with the alternate flags.
|
||||
let options = vec!["--classify", "--file-type", "-p"];
|
||||
for opt in options {
|
||||
scene
|
||||
.ucmd()
|
||||
.arg(opt.to_string())
|
||||
.succeeds()
|
||||
.stdout_contains(&"/");
|
||||
scene.ucmd().arg(opt).succeeds().stdout_contains(&"/");
|
||||
}
|
||||
|
||||
// Classify and File-Type all contain indicators for pipes and links.
|
||||
|
|
|
@ -64,7 +64,7 @@ const TESTS: [TestCase; 10] = [
|
|||
#[allow(clippy::needless_lifetimes)]
|
||||
fn convert_path<'a>(path: &'a str) -> Cow<'a, str> {
|
||||
#[cfg(windows)]
|
||||
return path.replace("/", "\\").into();
|
||||
return path.replace('/', "\\").into();
|
||||
#[cfg(not(windows))]
|
||||
return path.into();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue