1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-08-04 15:07:47 +00:00

refactor/polish ~ fix cargo clippy complaints ('better' as println!(...))

This commit is contained in:
Roy Ivy III 2019-12-28 12:34:10 -06:00
parent ba5a2435be
commit 291d2f5d48
4 changed files with 5 additions and 6 deletions

View file

@ -58,7 +58,7 @@ impl InputOffset {
/// both `Radix::NoPrefix` was set and no label (--traditional) is used.
pub fn print_final_offset(&self) {
if self.radix != Radix::NoPrefix || self.label.is_some() {
print!("{}\n", self.format_byte_offset());
println!("{}", self.format_byte_offset());
}
}
}

View file

@ -469,7 +469,7 @@ fn print_bytes(prefix: &str, input_decoder: &MemoryDecoder, output_info: &Output
// lines of multi-format rasters.
print!("{:>width$}", "", width = prefix.chars().count());
}
print!("{}\n", output_text);
println!("{}", output_text);
}
}

View file

@ -66,7 +66,7 @@ pub fn uumain(args: Vec<String>) -> i32 {
"{}",
opts.usage("Shrink or extend the size of each file to the specified size.")
);
print!(
println!(
"
SIZE is an integer with an optional prefix and optional unit.
The available units (K, M, G, T, P, E, Z, and Y) use the following format:
@ -83,8 +83,7 @@ file based on its current size:
'<' => at most
'>' => at least
'/' => round down to multiple of
'%' => round up to multiple of
"
'%' => round up to multiple of"
);
} else if matches.opt_present("version") {
println!("{} {}", NAME, VERSION);

View file

@ -91,7 +91,7 @@ fn print_loadavg() {
let loads: i32 = unsafe { transmute(getloadavg(avg.as_mut_ptr(), 3)) };
if loads == -1 {
print!("\n");
println!();
} else {
print!("load average: ");
for n in 0..loads {