[librsvg: 6/13] Remove match with a single binding




commit 51ef6f9d2ee1a2d6b655fcf8246fcc4529f97659
Author: Sven Neumann <sven svenfoo org>
Date:   Tue Aug 25 15:37:43 2020 +0200

    Remove match with a single binding
    
    See https://rust-lang.github.io/rust-clippy/master/index.html#match_single_binding

 librsvg/c_api.rs | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)
---
diff --git a/librsvg/c_api.rs b/librsvg/c_api.rs
index 97428e11..f063e5ca 100644
--- a/librsvg/c_api.rs
+++ b/librsvg/c_api.rs
@@ -1953,11 +1953,9 @@ impl ErrorDomain for RsvgError {
         RSVG_ERROR_FAILED
     }
 
-    fn from(code: i32) -> Option<Self> {
-        match code {
-            // We don't have enough information from glib error codes
-            _ => Some(RsvgError),
-        }
+    fn from(_code: i32) -> Option<Self> {
+        // We don't have enough information from glib error codes
+        Some(RsvgError)
     }
 }
 


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