Watch
1
0
Fork
You've already forked smithay
0

take instead of drain-collect, twice

clippy's drain_collect fires under -D warnings on a newer toolchain than
upstream pins. Two lines, same semantics.
This commit is contained in:
Fimeg 2026-08-23 20:40:39 -04:00
commit 73a3bea958
2 changed files with 2 additions and 2 deletions

View file

@ -260,7 +260,7 @@ impl EGLBuffer {
/// Returns the underlying images
pub fn into_images(mut self) -> Vec<EGLImage> {
self.images.drain(..).collect()
std::mem::take(&mut self.images)
}
}

View file

@ -170,7 +170,7 @@ impl PopupGrabInner {
}
}
PopupUngrabStrategy::All => {
let grabs = guard.active_grabs.drain(..).collect::<Vec<_>>();
let grabs = std::mem::take(&mut guard.active_grabs);
if let Some(grab) = grabs.first() {
let dismissed = PopupManager::dismiss_popup(root, grab);