[librsvg: 2/4] pattern.rs: Remove temporary variable




commit dca3f6cd50d285486f42856573323fb388296dcc
Author: Federico Mena Quintero <federico gnome org>
Date:   Mon Jul 11 12:39:41 2022 -0500

    pattern.rs: Remove temporary variable
    
    Part-of: <https://gitlab.gnome.org/GNOME/librsvg/-/merge_requests/713>

 src/pattern.rs | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)
---
diff --git a/src/pattern.rs b/src/pattern.rs
index 66bb66acb..24635546b 100644
--- a/src/pattern.rs
+++ b/src/pattern.rs
@@ -379,13 +379,11 @@ impl ResolvedPattern {
 
             Transform::new_scale(sw, sh).pre_translate(x, y)
         } else {
-            let PatternContentUnits(content_units) = self.content_units;
-
-            match content_units {
-                CoordUnits::ObjectBoundingBox => {
+            match self.content_units {
+                PatternContentUnits(CoordUnits::ObjectBoundingBox) => {
                     Transform::new_scale(bbrect.width(), bbrect.height())
                 }
-                CoordUnits::UserSpaceOnUse => Transform::identity(),
+                PatternContentUnits(CoordUnits::UserSpaceOnUse) => Transform::identity(),
             }
         };
 


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