remove dead code

This commit is contained in:
Dietmar Maurer 2019-01-05 16:55:21 +01:00
parent 51b499db74
commit 1006acd626
2 changed files with 0 additions and 21 deletions

View File

@ -1,5 +1,3 @@
pub mod static_map;
pub mod tools;
/// API definition helper

View File

@ -1,19 +0,0 @@
#[derive(Debug)]
pub struct StaticMap<'a, K, V> {
pub entries: &'a [(K,V)],
}
impl<'a, K: Eq, V> StaticMap<'a, K, V> {
#[inline]
pub fn len(&self) -> usize {
self.entries.len()
}
pub fn get(&self, key: &K) -> Option<&V> {
for (ref k, ref v) in self.entries {
if k == key { return Some(v) }
}
None
}
}