A lot of structural work

This commit is contained in:
Carl Lerche
2017-08-03 11:40:50 -07:00
parent e810b30999
commit 7a804601c5
11 changed files with 193 additions and 85 deletions

View File

@@ -42,6 +42,11 @@ impl Store {
}
}
pub fn insert(&mut self, id: StreamId, val: State) {
let handle = self.slab.insert(val);
assert!(self.ids.insert(id, handle).is_none());
}
pub fn entry(&mut self, id: StreamId) -> Entry {
use self::hash_map::Entry::*;