style: Rustfmt recent changes.

This commit is contained in:
Emilio Cobos Álvarez 2019-01-07 00:00:55 +01:00
parent 152ef2e042
commit 5f173c463e
16 changed files with 53 additions and 43 deletions

View file

@ -546,7 +546,9 @@ pub enum NumberOrPercentage {
impl NumberOrPercentage {
fn clamp_to_non_negative(self) -> Self {
match self {
NumberOrPercentage::Percentage(p) => NumberOrPercentage::Percentage(p.clamp_to_non_negative()),
NumberOrPercentage::Percentage(p) => {
NumberOrPercentage::Percentage(p.clamp_to_non_negative())
},
NumberOrPercentage::Number(n) => NumberOrPercentage::Number(n.max(0.)),
}
}