[rust] cache-aware DP - approx tree (#1934)
This commit is contained in:
@@ -67,7 +67,7 @@ fn test_prefix_match_partial() {
|
||||
fn test_prefix_match_no_match() {
|
||||
let mut tree = RadixTree::new();
|
||||
tree.insert(&[1, 2, 3, 4]);
|
||||
let empty_slices: &[usize] = &[];
|
||||
let empty_slices: &[u32] = &[];
|
||||
assert_eq!(tree.prefix_match(&[5, 6, 7]), empty_slices);
|
||||
}
|
||||
|
||||
@@ -124,7 +124,7 @@ fn test_delete_nonexistent() {
|
||||
#[test]
|
||||
fn test_empty_input() {
|
||||
let mut tree = RadixTree::new();
|
||||
let empty_slice: &[usize] = &[];
|
||||
let empty_slice: &[u32] = &[];
|
||||
tree.insert(empty_slice);
|
||||
assert_eq!(tree.prefix_match(empty_slice), empty_slice);
|
||||
tree.delete(empty_slice); // Should not panic
|
||||
|
||||
Reference in New Issue
Block a user