mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-09-13 10:37:58 +00:00
correct clippy issues, RustFmt
This commit is contained in:
parent
2106ddd088
commit
5646c81332
1 changed files with 7 additions and 8 deletions
|
@ -347,20 +347,19 @@ fn cat_files(files: Vec<String>, options: &OutputOptions) -> UResult<()> {
|
|||
|
||||
for path in &files {
|
||||
if let Err(err) = cat_path(path, options, &mut state) {
|
||||
error_messages.push(
|
||||
format!("{}: {}", path, err));
|
||||
error_messages.push(format!("{}: {}", path, err));
|
||||
}
|
||||
}
|
||||
if error_messages.len() == 0 {
|
||||
if error_messages.is_empty() {
|
||||
Ok(())
|
||||
} else {
|
||||
// each next line is expected to display "cat: …"
|
||||
let line_joiner = format!("\n{}: ",
|
||||
executable!()).to_owned();
|
||||
let line_joiner = format!("\n{}: ", executable!());
|
||||
|
||||
Err(uucore::error::USimpleError::new(
|
||||
error_messages.len() as i32,
|
||||
error_messages.join(&line_joiner).into()))
|
||||
error_messages.join(&line_joiner),
|
||||
))
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue