[fractal/clippyfixes: 4/7] clippy: redundant pattern matching




commit 430130c8c13e9a3d0e8b316cc08c2306bb8b844f
Author: Alexandre Franke <afranke gnome org>
Date:   Fri Oct 23 17:45:02 2020 +0200

    clippy: redundant pattern matching
    
    https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching

 fractal-gtk/src/actions/login.rs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/fractal-gtk/src/actions/login.rs b/fractal-gtk/src/actions/login.rs
index 72991c1d..eaa539a5 100644
--- a/fractal-gtk/src/actions/login.rs
+++ b/fractal-gtk/src/actions/login.rs
@@ -88,7 +88,7 @@ pub fn new(
     }));
 
     back.connect_activate(clone!(@weak deck => move |_, _| {
-        if let Some(_) = deck.get_adjacent_child(libhandy::NavigationDirection::Back) {
+        if deck.get_adjacent_child(libhandy::NavigationDirection::Back).is_some() {
             deck.navigate(libhandy::NavigationDirection::Back);
         }
     }));


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