jay-compositor 1.14.0

The Jay compositor
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use std::collections::HashMap;

pub trait HashMapExt {
    type V;

    fn drain_values(&mut self) -> impl Iterator<Item = Self::V>;
}

impl<K, V, S> HashMapExt for HashMap<K, V, S> {
    type V = V;

    fn drain_values(&mut self) -> impl Iterator<Item = Self::V> {
        self.drain().map(|(_, v)| v)
    }
}