Update tests with Range parameter to BTreeMap::extract_if etc.
This commit is contained in:
parent
51d247c2cf
commit
1ae96fcd79
7 changed files with 56 additions and 46 deletions
|
|
@ -14,14 +14,14 @@ fn main() {
|
|||
map.insert("c", ());
|
||||
|
||||
{
|
||||
let mut it = map.extract_if(|_, _| true);
|
||||
let mut it = map.extract_if(.., |_, _| true);
|
||||
catch_unwind(AssertUnwindSafe(|| while it.next().is_some() {})).unwrap_err();
|
||||
let result = catch_unwind(AssertUnwindSafe(|| it.next()));
|
||||
assert!(matches!(result, Ok(None)));
|
||||
}
|
||||
|
||||
{
|
||||
let mut it = map.extract_if(|_, _| true);
|
||||
let mut it = map.extract_if(.., |_, _| true);
|
||||
catch_unwind(AssertUnwindSafe(|| while let Some(_) = it.next() {})).unwrap_err();
|
||||
let result = catch_unwind(AssertUnwindSafe(|| it.next()));
|
||||
assert!(matches!(result, Ok(None)));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue