diff --git a/src/shell/layout/mod.rs b/src/shell/layout/mod.rs index 9169d774..93e5f677 100644 --- a/src/shell/layout/mod.rs +++ b/src/shell/layout/mod.rs @@ -61,7 +61,10 @@ pub struct TilingExceptions { } impl TilingExceptions { - pub fn new(exceptions_config: &Vec) -> Self { + pub fn new<'a, I>(exceptions_config: I) -> Self + where + I: Iterator + { let mut app_ids = Vec::new(); let mut titles = Vec::new(); diff --git a/src/shell/mod.rs b/src/shell/mod.rs index 9a262ea8..5a91bf3f 100644 --- a/src/shell/mod.rs +++ b/src/shell/mod.rs @@ -1235,7 +1235,7 @@ impl Shell { pub fn new(config: &Config) -> Self { let theme = cosmic::theme::system_preference(); - let tiling_exceptions = layout::TilingExceptions::new(&config.tiling_exceptions); + let tiling_exceptions = layout::TilingExceptions::new(config.tiling_exceptions.iter()); Shell { workspaces: Workspaces::new(config, theme.clone()), @@ -3577,7 +3577,10 @@ impl Shell { &self.theme } - pub fn update_tiling_exceptions(&mut self, exceptions: &Vec) { + pub fn update_tiling_exceptions<'a, I>(&mut self, exceptions: I) + where + I: Iterator + { self.tiling_exceptions = layout::TilingExceptions::new(exceptions); }