diff --git a/experimental/compactdecimal/src/compactdecimal.rs b/experimental/compactdecimal/src/compactdecimal.rs index 6852f8b8887..e79779d8062 100644 --- a/experimental/compactdecimal/src/compactdecimal.rs +++ b/experimental/compactdecimal/src/compactdecimal.rs @@ -268,7 +268,7 @@ impl CompactDecimalFormatter { value: Cow::Owned(CompactDecimal::noncompact(unrounded)), }; } - significand = unrounded.clone().multiplied_pow10(-i16::from(exponent)); + significand = unrounded.multiplied_pow10(-i16::from(exponent)); // TODO(egg): Discuss correctness. round(&mut significand); } @@ -355,7 +355,7 @@ impl CompactDecimalFormatter { return Err(CompactDecimalError::Exponent { actual: value.exponent(), expected: i16::from(expected_exponent), - log10_type: log10_type, + log10_type, }); } diff --git a/experimental/compactdecimal/src/format.rs b/experimental/compactdecimal/src/format.rs index 66330f96bbf..cdba4d178f2 100644 --- a/experimental/compactdecimal/src/format.rs +++ b/experimental/compactdecimal/src/format.rs @@ -50,7 +50,7 @@ impl<'l> Writeable for FormattedCompactDecimal<'l> { _ => { let i = usize::from(chosen_pattern.index); sink.write_str( - &chosen_pattern + chosen_pattern .literal_text .get(..i) .ok_or(core::fmt::Error)?, @@ -60,7 +60,7 @@ impl<'l> Writeable for FormattedCompactDecimal<'l> { .format(self.value.significand()) .write_to(sink)?; sink.write_str( - &chosen_pattern + chosen_pattern .literal_text .get(i..) .ok_or(core::fmt::Error)?, diff --git a/experimental/compactdecimal/src/provider.rs b/experimental/compactdecimal/src/provider.rs index 9185331bfa2..fa4bcfd8bf8 100644 --- a/experimental/compactdecimal/src/provider.rs +++ b/experimental/compactdecimal/src/provider.rs @@ -93,14 +93,14 @@ pub enum Count { impl From for Count { fn from(other: PluralCategory) -> Self { use PluralCategory::*; - return match other { + match other { Zero => Count::Zero, One => Count::One, Two => Count::Two, Few => Count::Few, Many => Count::Many, Other => Count::Other, - }; + } } }