mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-08-04 15:07:47 +00:00
refactor/polish ~ fix cargo clippy
complaints (redundant return variable)
This commit is contained in:
parent
88a45a157b
commit
94c088f452
3 changed files with 4 additions and 7 deletions
|
@ -493,6 +493,5 @@ fn open_input_peek_reader<'a>(
|
||||||
|
|
||||||
let mf = MultifileReader::new(inputs);
|
let mf = MultifileReader::new(inputs);
|
||||||
let pr = PartialReader::new(mf, skip_bytes, read_bytes);
|
let pr = PartialReader::new(mf, skip_bytes, read_bytes);
|
||||||
let input = PeekReader::new(pr);
|
PeekReader::new(pr)
|
||||||
input
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -86,8 +86,7 @@ pub fn arrnum_int_div_step<'a>(
|
||||||
Vec::new()
|
Vec::new()
|
||||||
} else {
|
} else {
|
||||||
let remainder_as_arrnum = unsigned_to_arrnum(bufferval);
|
let remainder_as_arrnum = unsigned_to_arrnum(bufferval);
|
||||||
let remainder_as_base_arrnum = base_conv_vec(&remainder_as_arrnum, 10, radix_in);
|
base_conv_vec(&remainder_as_arrnum, 10, radix_in)
|
||||||
remainder_as_base_arrnum
|
|
||||||
};
|
};
|
||||||
rem_out.position += 1 + (traversed - rem_out.replace.len());
|
rem_out.position += 1 + (traversed - rem_out.replace.len());
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -216,13 +216,12 @@ impl Formatter for Intf {
|
||||||
if convert_hints.check_past_max || decr_from_max || radix_mismatch {
|
if convert_hints.check_past_max || decr_from_max || radix_mismatch {
|
||||||
// radix of in and out is the same.
|
// radix of in and out is the same.
|
||||||
let segment = String::from(&str_in[begin..end]);
|
let segment = String::from(&str_in[begin..end]);
|
||||||
let m = Intf::conv_from_segment(
|
Intf::conv_from_segment(
|
||||||
&segment,
|
&segment,
|
||||||
inprefix.radix_in.clone(),
|
inprefix.radix_in.clone(),
|
||||||
*field.field_char,
|
*field.field_char,
|
||||||
inprefix.sign,
|
inprefix.sign,
|
||||||
);
|
)
|
||||||
m
|
|
||||||
} else {
|
} else {
|
||||||
// otherwise just do a straight string copy.
|
// otherwise just do a straight string copy.
|
||||||
let mut fmt_prim: FormatPrimitive = Default::default();
|
let mut fmt_prim: FormatPrimitive = Default::default();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue