[librsvg: 5/37] text.rs: Don't obviate TextAnchor::End with "_"; spell it out explicitly



commit c55511b1d1d92be40aa4e8f7430ef0c6e02aca5c
Author: Federico Mena Quintero <federico gnome org>
Date:   Tue Oct 30 09:15:42 2018 -0600

    text.rs: Don't obviate TextAnchor::End with "_"; spell it out explicitly

 rsvg_internals/src/text.rs | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)
---
diff --git a/rsvg_internals/src/text.rs b/rsvg_internals/src/text.rs
index 3259ceb2..15c217d7 100644
--- a/rsvg_internals/src/text.rs
+++ b/rsvg_internals/src/text.rs
@@ -201,15 +201,15 @@ impl NodeTrait for NodeText {
             y -= offset;
             dy = match anchor {
                 TextAnchor::Start => dy,
-                TextAnchor::Middle => dy / 2f64,
-                _ => 0f64,
+                TextAnchor::Middle => dy / 2.0,
+                TextAnchor::End => 0.0,
             }
         } else {
             x -= offset;
             dx = match anchor {
                 TextAnchor::Start => dx,
-                TextAnchor::Middle => dx / 2f64,
-                _ => 0f64,
+                TextAnchor::Middle => dx / 2.0,
+                TextAnchor::End => 0.0,
             }
         }
 
@@ -379,8 +379,8 @@ impl NodeTSpan {
                 x -= offset;
                 dx = match anchor {
                     TextAnchor::Start => dx,
-                    TextAnchor::Middle => dx / 2f64,
-                    TextAnchor::End => 0f64,
+                    TextAnchor::Middle => dx / 2.0,
+                    TextAnchor::End => 0.0,
                 }
             }
         }
@@ -392,8 +392,8 @@ impl NodeTSpan {
                 y -= offset;
                 dy = match anchor {
                     TextAnchor::Start => dy,
-                    TextAnchor::Middle => dy / 2f64,
-                    TextAnchor::End => 0f64,
+                    TextAnchor::Middle => dy / 2.0,
+                    TextAnchor::End => 0.0,
                 }
             }
         }


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