[librsvg] viewbox: small cleanup



commit a5fc228a60cedb8c5d57fdef5d33d72466240c39
Author: Paolo Borelli <pborelli gnome org>
Date:   Sun Nov 17 11:50:35 2019 +0100

    viewbox: small cleanup

 rsvg_internals/src/viewbox.rs | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)
---
diff --git a/rsvg_internals/src/viewbox.rs b/rsvg_internals/src/viewbox.rs
index f0072018..5826a99e 100644
--- a/rsvg_internals/src/viewbox.rs
+++ b/rsvg_internals/src/viewbox.rs
@@ -46,12 +46,7 @@ impl Parse for ViewBox {
         let (x, y, width, height) = (v[0], v[1], v[2], v[3]);
 
         if width >= 0.0 && height >= 0.0 {
-            Ok(ViewBox {
-                x,
-                y,
-                width,
-                height,
-            })
+            Ok(ViewBox::new(x, y, width, height))
         } else {
             Err(ValueErrorKind::Value(
                 "width and height must not be negative".to_string(),


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