[librsvg: 29/43] length: pass by value



commit ecb89f28cd37b44eb567b69e2bda8e25a7a92e2d
Author: Paolo Borelli <pborelli gnome org>
Date:   Sun Oct 13 12:45:27 2019 +0200

    length: pass by value

 rsvg_internals/src/length.rs | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/rsvg_internals/src/length.rs b/rsvg_internals/src/length.rs
index 80b86b8b..6adc75f4 100644
--- a/rsvg_internals/src/length.rs
+++ b/rsvg_internals/src/length.rs
@@ -51,8 +51,8 @@ enum LengthDir {
 }
 
 impl LengthDir {
-    fn scaling_factor(&self, x: f64, y: f64) -> f64 {
-        match *self {
+    fn scaling_factor(self, x: f64, y: f64) -> f64 {
+        match self {
             LengthDir::Horizontal => x,
             LengthDir::Vertical => y,
             LengthDir::Both => viewport_percentage(x, y),


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