remove dead code
This commit is contained in:
parent
51b499db74
commit
1006acd626
@ -1,5 +1,3 @@
|
||||
pub mod static_map;
|
||||
|
||||
pub mod tools;
|
||||
|
||||
/// API definition helper
|
||||
|
@ -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
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user