From 83ec82ec54f701168bee696fdd39c44375ea5ac9 Mon Sep 17 00:00:00 2001 From: Paul van Tilburg Date: Fri, 24 Aug 2018 21:20:52 +0200 Subject: [PATCH] Run rustfmt --- src/main.rs | 12 +++++++----- src/registry.rs | 11 ++++++----- 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/src/main.rs b/src/main.rs index 8d63cf5..bb01b33 100644 --- a/src/main.rs +++ b/src/main.rs @@ -57,7 +57,8 @@ fn load_albums(ui: &mut Cursive) { let cb = ui.cb_sink().clone(); ui.add_layer( - Dialog::around(ProgressBar::new() + Dialog::around( + ProgressBar::new() .range(0, registry.albums_list.len()) .with_task(move |counter| { let mut registry = REGISTRY.lock().unwrap(); @@ -67,7 +68,8 @@ fn load_albums(ui: &mut Cursive) { } else { cb.send(Box::new(select_albums)); } - })).title("Loading list of albums…"), + }), + ).title("Loading list of albums…"), ); } @@ -120,7 +122,8 @@ fn select_albums(ui: &mut Cursive) { } list_view.add_child(album_name(album_path), checkbox); } - }).scrollable(); + }) + .scrollable(); ui.pop_layer(); ui.add_layer( @@ -141,8 +144,7 @@ fn save_albums(ui: &mut Cursive) { ui.pop_layer(); ui.add_layer( - Dialog::around(TextView::new("All albums have been saved!")) - .button("Ok", |ui| ui.quit()) + Dialog::around(TextView::new("All albums have been saved!")).button("Ok", |ui| ui.quit()), ); } diff --git a/src/registry.rs b/src/registry.rs index 0b03463..08715ae 100644 --- a/src/registry.rs +++ b/src/registry.rs @@ -23,11 +23,12 @@ impl Registry { .max_depth(2); let dir_filter = |entry: &DirEntry| { // The entry should be a directory and its name should not start with "extra" - entry.metadata().map(|e| e.is_dir()).unwrap_or(false) && !entry - .file_name() - .to_str() - .map(|s| s.starts_with("extra")) - .unwrap_or(true) + entry.metadata().map(|e| e.is_dir()).unwrap_or(false) + && !entry + .file_name() + .to_str() + .map(|s| s.starts_with("extra")) + .unwrap_or(true) }; for entry in dir_walker.into_iter().filter_entry(dir_filter) {