Add getter for key/value

This commit is contained in:
Matthias Beyer 2016-01-20 10:45:13 +01:00
parent 78e104706f
commit e86403978d

View file

@ -17,6 +17,14 @@ impl<K, V> KeyValue<K, V> {
KeyValue { k: k, v: v }
}
pub fn key(&self) -> &K {
&self.k
}
pub fn value(&self) -> &V {
&self.v
}
}
impl<K, V> Into<(K, V)> for KeyValue<K, V> {