Run rustfmt
This commit is contained in:
parent
056e1c388b
commit
83ec82ec54
12
src/main.rs
12
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()),
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -23,7 +23,8 @@ 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
|
||||
entry.metadata().map(|e| e.is_dir()).unwrap_or(false)
|
||||
&& !entry
|
||||
.file_name()
|
||||
.to_str()
|
||||
.map(|s| s.starts_with("extra"))
|
||||
|
|
Reference in New Issue