1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-09-16 19:56:17 +00:00

refactor/numfmt ~ fix cargo clippy complaint (clippy::needless_borrow)

This commit is contained in:
Roy Ivy III 2021-06-06 12:19:42 -05:00
parent ca50eae003
commit 63112783b2

View file

@ -238,7 +238,7 @@ fn format_and_print_delimited(s: &str, options: &NumfmtOptions) -> Result<()> {
} }
if field_selected { if field_selected {
print!("{}", format_string(&field.trim_start(), options, None)?); print!("{}", format_string(field.trim_start(), options, None)?);
} else { } else {
// print unselected field without conversion // print unselected field without conversion
print!("{}", field); print!("{}", field);
@ -271,7 +271,7 @@ fn format_and_print_whitespace(s: &str, options: &NumfmtOptions) -> Result<()> {
None None
}; };
print!("{}", format_string(&field, options, implicit_padding)?); print!("{}", format_string(field, options, implicit_padding)?);
} else { } else {
// print unselected field without conversion // print unselected field without conversion
print!("{}{}", prefix, field); print!("{}{}", prefix, field);