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:
parent
53c6f45be8
commit
73a3bea958
2 changed files with 2 additions and 2 deletions
|
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in a new issue