Skip to content

Commit

Permalink
appease clippy a little bit
Browse files Browse the repository at this point in the history
  • Loading branch information
eggrobin committed Dec 19, 2022
1 parent 9a9b7ae commit 6ba4c27
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions experimental/compactdecimal/src/compactdecimal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down Expand Up @@ -355,7 +355,7 @@ impl CompactDecimalFormatter {
return Err(CompactDecimalError::Exponent {
actual: value.exponent(),
expected: i16::from(expected_exponent),
log10_type: log10_type,
log10_type,
});
}

Expand Down
4 changes: 2 additions & 2 deletions experimental/compactdecimal/src/format.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)?,
Expand All @@ -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)?,
Expand Down
4 changes: 2 additions & 2 deletions experimental/compactdecimal/src/provider.rs
Original file line number Diff line number Diff line change
Expand Up @@ -93,14 +93,14 @@ pub enum Count {
impl From<PluralCategory> 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,
};
}
}
}

Expand Down

0 comments on commit 6ba4c27

Please sign in to comment.