fix(window-state): fix warning

pull/531/head
luohy 2 years ago
parent 10834e8baa
commit f27392c3ef

@ -212,7 +212,7 @@ impl<R: Runtime> WindowExt for Window<R> {
metadata.fullscreen = self.is_fullscreen()?; metadata.fullscreen = self.is_fullscreen()?;
} }
c.insert(key.into(), metadata); c.insert(key, metadata);
} }
if flags.contains(StateFlags::VISIBLE) && should_show { if flags.contains(StateFlags::VISIBLE) && should_show {
@ -296,11 +296,9 @@ impl Group {
} }
/// get group name which match first rule /// get group name which match first rule
pub fn group_name(groups: &Vec<Group>, label: String) -> String { pub fn group_name(groups: &[Group], label: String) -> String {
groups groups
.iter() .iter().find(|g| g.filter(&label))
.filter(|g| g.filter(&label))
.nth(0)
.map_or(label, |g| g.name.clone()) .map_or(label, |g| g.name.clone())
} }

Loading…
Cancel
Save