Skip to content

Commit 41f50d7

Browse files
committed
Clean up get method slightly.
1 parent 47d7b83 commit 41f50d7

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/lib.rs

+3-2
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,8 @@ macro_rules! get_function {
155155
trie: &'a $($mut_)* TrieNode<K, V>,
156156
key: &K,
157157
mut key_fragments: NibbleVec)
158-
-> Option<&'a $($mut_)* V> where K: TrieKey {
158+
-> Option<&'a $($mut_)* V> where K: TrieKey
159+
{
159160
// Handle retrieval at the root.
160161
if key_fragments.len() == 0 {
161162
return match trie.key_value {
@@ -173,7 +174,7 @@ macro_rules! get_function {
173174
KeyMatch::Full => {
174175
match existing_child.key_value {
175176
Some(ref $($mut_)* kv) => {
176-
assert_eq!(&kv.key, key);
177+
check_keys(&kv.key, key);
177178
Some(& $($mut_)* kv.value)
178179
},
179180
None => None

0 commit comments

Comments
 (0)