gavl 0.1.5

A fast implementation for a map and a set using an AVL tree
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use super::{
    super::{
        Map
    }
};

impl<KeyType:Ord, ContentType> FromIterator<(KeyType, ContentType)> for Map<KeyType, ContentType> {
    fn from_iter<IterType:IntoIterator<Item=(KeyType, ContentType)>>(iter:IterType) -> Self {
        let mut holder:Map<KeyType, ContentType> = Map::new();
        for elem in iter {
            let _ = holder.add(elem.0, elem.1);
        }
        holder
    }
}