[librsvg: 6/10] Simplify match expression




commit e5a4e80bb3677a69bf0f2405bac6ba62b513d1c3
Author: Daniel Petri Rocha <daniel petri tum de>
Date:   Sun Nov 7 18:00:14 2021 +0100

    Simplify match expression

 src/bin/rsvg-convert.rs | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
---
diff --git a/src/bin/rsvg-convert.rs b/src/bin/rsvg-convert.rs
index b1ae791c..69eb1433 100644
--- a/src/bin/rsvg-convert.rs
+++ b/src/bin/rsvg-convert.rs
@@ -559,8 +559,7 @@ impl Converter {
 
                     unit = match (w_unit, h_unit) {
                         (None, None) => LengthUnit::Px,
-                        (None, u) => u.unwrap(),
-                        (u, None) => u.unwrap(),
+                        (None, u) | (u, None) => u.unwrap(),
                         (u1, u2) => {
                             if u1 == u2 {
                                 u1.unwrap()


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]