Skip to content

Commit

Permalink
more comment
Browse files Browse the repository at this point in the history
  • Loading branch information
shuoli84 committed Aug 10, 2024
1 parent 4b9d3b4 commit dd5d788
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion examples/augment_even_count.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,14 +80,15 @@ fn main() {
}
assert_eq!(dbg!(tree.root_argument()).0, 49900);

// able to get nth even value easily
for i in 0..tree.root_argument().0 {
let Some((k, _)) = tree.get_by_argument::<usize>(i) else {
panic!("should got a value");
};
assert_eq!(k % 2, 0);
}

// offset = length - 1
// offset = length - 1, get(length) should be None
assert!(tree
.get_by_argument::<usize>(tree.root_argument().0)
.is_none());
Expand Down

0 comments on commit dd5d788

Please sign in to comment.