Apply suggestions from code review
Co-authored-by: Victoria Brekenfeld <4404502+Drakulix@users.noreply.github.com>
This commit is contained in:
parent
5482ff65e5
commit
bd95340992
2 changed files with 9 additions and 3 deletions
|
|
@ -61,7 +61,10 @@ pub struct TilingExceptions {
|
|||
}
|
||||
|
||||
impl TilingExceptions {
|
||||
pub fn new(exceptions_config: &Vec<ApplicationException>) -> Self {
|
||||
pub fn new<'a, I>(exceptions_config: I) -> Self
|
||||
where
|
||||
I: Iterator<Item=&'a ApplicationException>
|
||||
{
|
||||
let mut app_ids = Vec::new();
|
||||
let mut titles = Vec::new();
|
||||
|
||||
|
|
|
|||
|
|
@ -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<ApplicationException>) {
|
||||
pub fn update_tiling_exceptions<'a, I>(&mut self, exceptions: I)
|
||||
where
|
||||
I: Iterator<Item=&'a ApplicationException>
|
||||
{
|
||||
self.tiling_exceptions = layout::TilingExceptions::new(exceptions);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue