use str range for string btreemap in test
This commit is contained in:
parent
d5f1f5bc25
commit
95bef0d5d7
1 changed files with 2 additions and 2 deletions
|
|
@ -208,8 +208,8 @@ fn test_range_borrowed_key() {
|
|||
map.insert("baboon".to_string(), 2);
|
||||
map.insert("coyote".to_string(), 3);
|
||||
map.insert("dingo".to_string(), 4);
|
||||
// NOTE: would like to use simply "a".."d" here...
|
||||
let mut iter = map.range("b".to_string().."d".to_string());
|
||||
// NOTE: would like to use simply "b".."d" here...
|
||||
let mut iter = map.range::<str, _>((Included("b"),Excluded("d")));
|
||||
assert_eq!(iter.next(), Some((&"baboon".to_string(), &2)));
|
||||
assert_eq!(iter.next(), Some((&"coyote".to_string(), &3)));
|
||||
assert_eq!(iter.next(), None);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue