diff options
Diffstat (limited to 'src/liballoc/tests/linked_list.rs')
| -rw-r--r-- | src/liballoc/tests/linked_list.rs | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/liballoc/tests/linked_list.rs b/src/liballoc/tests/linked_list.rs index c40f99ee906..afcb9e03fd0 100644 --- a/src/liballoc/tests/linked_list.rs +++ b/src/liballoc/tests/linked_list.rs @@ -590,13 +590,12 @@ fn drain_filter_pred_panic_leak() { q.push_front(D(1)); q.push_front(D(0)); - catch_unwind(AssertUnwindSafe(|| drop(q.drain_filter(|item| if item.0 >= 2 { - panic!() - } else { - true - })))).ok(); + catch_unwind(AssertUnwindSafe(|| { + drop(q.drain_filter(|item| if item.0 >= 2 { panic!() } else { true })) + })) + .ok(); - assert_eq!(unsafe { DROPS }, 2); // 0 and 1 + assert_eq!(unsafe { DROPS }, 2); // 0 and 1 assert_eq!(q.len(), 6); } |
