diff options
| author | Laurenz <laurmaedje@gmail.com> | 2022-11-04 09:30:44 +0100 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2022-11-04 11:38:09 +0100 |
| commit | eb951c008beea502042db4a3a0e8d1f8b51f6f52 (patch) | |
| tree | 9856ee4ed0222222669de10e616a580b2a60135e /src/model/value.rs | |
| parent | 33928a00dc58250e24da1dae4e5db17e7b598d70 (diff) | |
Style changes
Diffstat (limited to 'src/model/value.rs')
| -rw-r--r-- | src/model/value.rs | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/src/model/value.rs b/src/model/value.rs index 07719883..825e6f55 100644 --- a/src/model/value.rs +++ b/src/model/value.rs @@ -294,11 +294,8 @@ where } fn dyn_eq(&self, other: &Dynamic) -> bool { - if let Some(other) = other.downcast::<Self>() { - self == other - } else { - false - } + let Some(other) = other.downcast::<Self>() else { return false }; + self == other } fn dyn_type_name(&self) -> &'static str { @@ -411,15 +408,9 @@ mod tests { test(Abs::pt(5.5), "5.5pt"); test(Angle::deg(90.0), "90deg"); test(Ratio::one() / 2.0, "50%"); - test( - Ratio::new(0.3) + Length::from(Abs::cm(2.0)), - "30% + 56.69pt", - ); + test(Ratio::new(0.3) + Length::from(Abs::cm(2.0)), "30% + 56.69pt"); test(Fr::one() * 7.55, "7.55fr"); - test( - Color::Rgba(RgbaColor::new(1, 1, 1, 0xff)), - "rgb(\"#010101\")", - ); + test(Color::Rgba(RgbaColor::new(1, 1, 1, 0xff)), "rgb(\"#010101\")"); // Collections. test("hello", r#""hello""#); |
