]> git.nihav.org Git - nihav.git/commitdiff
simplify
authorKostya Shishkov <kostya.shishkov@gmail.com>
Sat, 20 May 2017 15:48:20 +0000 (17:48 +0200)
committerKostya Shishkov <kostya.shishkov@gmail.com>
Sat, 20 May 2017 15:48:20 +0000 (17:48 +0200)
src/codecs/mod.rs

index 75f07c1b6bdcb816a125c2a46d3447952971cb51..14cb0b31cdce037d779d10adbae7a9276c863bd5 100644 (file)
@@ -53,12 +53,13 @@ impl HAMShuffler {
     }
     #[allow(dead_code)]
     fn clone_ref(&mut self) -> Option<NAFrameRef> {
-        if let None = self.lastframe { return None; }
         if let Some(ref mut frm) = self.lastframe {
             let newfrm = Rc::new(RefCell::new(NAFrame::from_copy(&frm.borrow())));
             *frm = newfrm.clone();
             Some(newfrm)
-        } else { None }
+        } else {
+            None
+        }
     }
     #[allow(dead_code)]
     fn get_output_frame(&mut self) -> Option<NAFrameRef> {