mirror of
https://github.com/uutils/coreutils
synced 2024-11-17 02:08:09 +00:00
refactor/polish ~ fix cargo clippy
complaints (use +=
/-=
notation)
This commit is contained in:
parent
768ed71725
commit
493f5f1496
2 changed files with 4 additions and 4 deletions
|
@ -72,7 +72,7 @@ fn format_float(f: f64, width: usize, precision: usize) -> String {
|
|||
let r = 10f64.powi(l);
|
||||
if (f > 0.0 && r > f) || (f < 0.0 && -r < f) {
|
||||
// fix precision error
|
||||
l = l - 1;
|
||||
l -= 1;
|
||||
}
|
||||
|
||||
if l >= 0 && l <= (precision as i32 - 1) {
|
||||
|
|
|
@ -79,12 +79,12 @@ impl Uniq {
|
|||
let mut i = 0;
|
||||
while field < skip_fields && i < line.len() {
|
||||
while i < line.len() && line.chars().nth(i).unwrap().is_whitespace() {
|
||||
i = i + 1;
|
||||
i += 1;
|
||||
}
|
||||
while i < line.len() && !line.chars().nth(i).unwrap().is_whitespace() {
|
||||
i = i + 1;
|
||||
i += 1;
|
||||
}
|
||||
field = field + 1;
|
||||
field += 1;
|
||||
}
|
||||
&line[i..]
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue