refactor(library): various Rust style optimizations
Lots of small fixes to the APIs and functions in the `library` module, mostly following best practices outlined in the Rust library guidelines. Changes outside the `library` module were mostly required changes after changing function signatures.
This commit is contained in:
committed by
Henrik Friedrichsen
parent
97f10a9493
commit
7940365344
@@ -61,7 +61,7 @@ impl ContextMenu {
|
||||
let mut list_select: SelectView<Playlist> = SelectView::new();
|
||||
let current_user_id = library.user_id.as_ref().unwrap();
|
||||
|
||||
for list in library.playlists().iter() {
|
||||
for list in library.playlists.read().unwrap().iter() {
|
||||
if current_user_id == &list.owner_id || list.collaborative {
|
||||
list_select.add_item(list.name.clone(), list.clone());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user