You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
currently the longest_common_prefix function behaves like this:
letmut trie = qp_trie::Trie::new();let a = vec![1];let b = vec![1,2,3];
trie.insert(a.as_slice(),1111);
trie.insert(b.as_slice(),2222);assert_eq!(
trie.longest_common_prefix([1u8,2u8].as_slice()),&[1u8,2u8]);
But I would I expect it to return [1u8] since this is the only valid prefix with key in the map ([1, 2] is not a valid prefix as it has no value in the map).
The text was updated successfully, but these errors were encountered:
Hey,
currently the
longest_common_prefix
function behaves like this:But I would I expect it to return
[1u8]
since this is the only valid prefix with key in the map ([1, 2]
is not a valid prefix as it has no value in the map).The text was updated successfully, but these errors were encountered: