From e86403978d3c1452dd55063dfb85a7b03c0d3523 Mon Sep 17 00:00:00 2001 From: Matthias Beyer Date: Wed, 20 Jan 2016 10:45:13 +0100 Subject: [PATCH] Add getter for key/value --- libimagutil/src/key_value_split.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/libimagutil/src/key_value_split.rs b/libimagutil/src/key_value_split.rs index 567118bb..b928820b 100644 --- a/libimagutil/src/key_value_split.rs +++ b/libimagutil/src/key_value_split.rs @@ -17,6 +17,14 @@ impl KeyValue { KeyValue { k: k, v: v } } + pub fn key(&self) -> &K { + &self.k + } + + pub fn value(&self) -> &V { + &self.v + } + } impl Into<(K, V)> for KeyValue {