[librsvg: 10/21] Appease clippy by simplifying




commit a8cf1b60caeaaa328d69115c4a8bf1b5594c9dff
Author: Madds H <madds hollandart io>
Date:   Mon Aug 23 01:04:27 2021 -0500

    Appease clippy by simplifying
    
    Part-of: <https://gitlab.gnome.org/GNOME/librsvg/-/merge_requests/576>

 src/transform.rs | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)
---
diff --git a/src/transform.rs b/src/transform.rs
index fb4db73f..cae7e5cf 100644
--- a/src/transform.rs
+++ b/src/transform.rs
@@ -101,18 +101,14 @@ impl Parse for TransformProperty {
 fn parse_transform_prop_function_list<'i>(
     parser: &mut Parser<'i, '_>,
 ) -> Result<Vec<TransformFunction>, ParseError<'i>> {
-    //TODO: How do I appease clippy here?
-    let mut t = TransformFunction::Translate(
-        Length::<Horizontal>::new(0.0, LengthUnit::Px),
-        Length::<Vertical>::new(0.0, LengthUnit::Px),
-    );
     let mut v = Vec::<TransformFunction>::new();
+
     loop {
         if parser.is_exhausted() {
             break;
         }
-        t = parse_transform_prop_function_command(parser)?;
-        v.push(t);
+
+        v.push(parse_transform_prop_function_command(parser)?);
     }
 
     Ok(v)


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