style(mac): take the workspaces with mem::take instead of drain(..).collect() (clippy::drain_collect)

monitor.rs remove_workspaces moved every workspace into a new VecDeque through drain; mem::take moves the whole deque and leaves an empty one, which is the same result without the second allocation.

No behaviour change. Pre-existing on the original macOS tip 9a58e511 (reported by cargo clippy --all-targets -D warnings on the Mini, stable 1.93).

Verified: fake-CC cargo clippy --locked --target aarch64-apple-darwin -p komorebi --all-targets -D warnings no longer reports this lint (see the last hygiene revision for the whole run). Verified on the Mini: not yet.
This commit is contained in:
LGUG2Z committed 2026-10-31 12:37:12 -07:00
1 parent 1c64168759
commit 552ab43701
1 file changed
+1 -1
+1 -1
View File
@@ -577,7 +577,7 @@ impl Monitor {
}
pub fn remove_workspaces(&mut self) -> VecDeque<Workspace> {
self.workspaces_mut().drain(..).collect()
std::mem::take(self.workspaces_mut())
}
pub fn ensure_workspace_count(&mut self, ensure_count: usize) {