diff --git a/src/ui/collation_menu.rs b/src/ui/collation_menu.rs index 64c7839..dfe3c36 100644 --- a/src/ui/collation_menu.rs +++ b/src/ui/collation_menu.rs @@ -16,8 +16,7 @@ pub struct FilmCollationMenu { widget : Box } pub struct SeriesCollationMenu { widget : Box } impl FilmCollationMenu { - pub fn new ( on_sort : F ) -> Self - where F : Fn (FilmsSortedBy) + 'static { + pub fn new < F : Fn (FilmsSortedBy) + 'static > ( on_sort : F ) -> Self { let widget = Box :: builder () . orientation (Horizontal) . halign (Center) @@ -62,8 +61,7 @@ fn create_sort_button ( sort_menu : & Popover ) -> SplitButton { . build () } -fn create_films_sort_menu ( on_sort : F ) -> Popover -where F : Fn (FilmsSortedBy) + 'static { +fn create_films_sort_menu < F : Fn (FilmsSortedBy) + 'static > ( on_sort : F ) -> Popover { let container = ListBox :: new () ; container . append ( & create_sort_menu_entry ( "Name" , false , true ) ) ; @@ -84,8 +82,7 @@ where F : Fn (FilmsSortedBy) + 'static { . css_classes ( ["menu"] ) . build () } -fn create_series_sort_menu ( on_sort : F ) -> Popover -where F : Fn (SeriesSortedBy) + 'static { +fn create_series_sort_menu < F : Fn (SeriesSortedBy) + 'static > ( on_sort : F ) -> Popover { let container = ListBox :: new () ; container . append ( & create_sort_menu_entry ( "Name" , false , true ) ) ; @@ -105,9 +102,7 @@ where F : Fn (SeriesSortedBy) + 'static { . build () } -fn create_sort_menu_entry ( - label : & str , reverse : bool , selected : bool , -) -> ListBoxRow { +fn create_sort_menu_entry ( label : & str , reverse : bool , selected : bool ) -> ListBoxRow { let icon = match reverse { false => Image :: from_icon_name ("view-sort-ascending-symbolic") , true => Image :: from_icon_name ("view-sort-descending-symbolic") ,