summaryrefslogtreecommitdiffstats
path: root/src/tab.rs
diff options
context:
space:
mode:
authorCaleb Bassi <calebjbassi@gmail.com>2019-02-15 19:13:42 -0800
committerCaleb Bassi <calebjbassi@gmail.com>2019-02-15 19:37:29 -0800
commit8b04fec104cd20b86ff98f4da225bb866a407f8c (patch)
treef9b58da3f2a107d136a66c61d08dead883965864 /src/tab.rs
parent055ac602929af367da2af77999e73de6bf8fd344 (diff)
Fix most clippy lints
Diffstat (limited to 'src/tab.rs')
-rw-r--r--src/tab.rs18
1 files changed, 6 insertions, 12 deletions
diff --git a/src/tab.rs b/src/tab.rs
index c767cfa..4a35124 100644
--- a/src/tab.rs
+++ b/src/tab.rs
@@ -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;
}