1
0
Fork 0
forked from wry/wry

wayland: implement wlr-data-control

This commit is contained in:
Julian Orth 2024-03-31 01:36:45 +01:00
parent 8bca8b0e86
commit 99be020c19
18 changed files with 985 additions and 33 deletions

View file

@ -76,6 +76,10 @@ impl<K: Eq, V, const N: usize> SmallMap<K, V, N> {
unsafe { self.m.get().deref_mut().take() }
}
pub fn replace(&self, other: SmallVec<[(K, V); N]>) -> SmallVec<[(K, V); N]> {
unsafe { mem::replace(&mut self.m.get().deref_mut().m, other) }
}
pub fn pop(&self) -> Option<(K, V)> {
unsafe { self.m.get().deref_mut().pop() }
}