address some no-op clippy warnings

This commit is contained in:
Scott Lamb
2021-05-17 14:31:50 -07:00
parent 603f02b686
commit 54bd068706
32 changed files with 185 additions and 241 deletions

View File

@@ -27,7 +27,7 @@ pub fn encode_size(mut raw: i64) -> String {
raw &= (1i64 << n) - 1;
}
}
if raw > 0 || encoded.len() == 0 {
if raw > 0 || encoded.is_empty() {
write!(&mut encoded, "{}", raw).unwrap();
} else {
encoded.pop(); // remove trailing space.
@@ -39,7 +39,7 @@ fn decode_sizepart(input: &str) -> IResult<&str, i64> {
map(
tuple((
map_res(take_while1(|c: char| c.is_ascii_digit()), |input: &str| {
i64::from_str_radix(input, 10)
input.parse::<i64>()
}),
opt(alt((
nom::combinator::value(1 << 40, tag("T")),