diff options
author | Caleb Bassi <calebjbassi@gmail.com> | 2019-02-15 19:13:42 -0800 |
---|---|---|
committer | Caleb Bassi <calebjbassi@gmail.com> | 2019-02-15 19:37:29 -0800 |
commit | 8b04fec104cd20b86ff98f4da225bb866a407f8c (patch) | |
tree | f9b58da3f2a107d136a66c61d08dead883965864 /src/tab.rs | |
parent | 055ac602929af367da2af77999e73de6bf8fd344 (diff) |
Fix most clippy lints
Diffstat (limited to 'src/tab.rs')
-rw-r--r-- | src/tab.rs | 18 |
1 files changed, 6 insertions, 12 deletions
@@ -42,24 +42,18 @@ impl JoshutoTab { pub fn reload_contents(&mut self, sort_type: &sort::SortType) { let mut list = self.curr_list.take(); - match list { - Some(ref mut s) => { - if s.path.exists() { - s.update_contents(sort_type).unwrap(); - } + if let Some(ref mut s) = list { + if s.path.exists() { + s.update_contents(sort_type).unwrap(); } - None => {} }; self.curr_list = list; list = self.parent_list.take(); - match list { - Some(ref mut s) => { - if s.path.exists() { - s.update_contents(sort_type).unwrap(); - } + if let Some(ref mut s) = list { + if s.path.exists() { + s.update_contents(sort_type).unwrap(); } - None => {} }; self.parent_list = list; } |