[librsvg] cargo-clippy: Remove redundant closures



commit a0624582a5784f6bae3eedcb20b046f84e2daefa
Author: Federico Mena Quintero <federico gnome org>
Date:   Thu Feb 22 13:39:55 2018 -0600

    cargo-clippy: Remove redundant closures

 rust/src/paint_server.rs | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/rust/src/paint_server.rs b/rust/src/paint_server.rs
index aa35b00a..a3b654d3 100644
--- a/rust/src/paint_server.rs
+++ b/rust/src/paint_server.rs
@@ -59,7 +59,7 @@ impl PaintServer {
                 alternate: PaintServer::parse_fallback(input),
             })
         } else {
-            PaintServer::parse_color(input).map(|color| PaintServer::SolidColor(color))
+            PaintServer::parse_color(input).map(PaintServer::SolidColor)
         }
     }
 
@@ -71,8 +71,8 @@ impl PaintServer {
         } else {
             input
                 .try(|i| cssparser::Color::parse(i))
-                .map(|c| Color::from(c))
-                .map_err(|e| AttributeError::from(e))
+                .map(Color::from)
+                .map_err(AttributeError::from)
         }
     }
 


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