Skip to content

Commit 6f8a1a6

Browse files
committed
Fix tests
1 parent 30cdb68 commit 6f8a1a6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

library/coretests/tests/mem.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -815,7 +815,7 @@ fn drop_guard_into_inner() {
815815
let dropped = Cell::new(false);
816816
let value = DropGuard::new(42, |_| dropped.set(true));
817817
let guard = DropGuard::new(value, |_| dropped.set(true));
818-
let inner = DropGuard::into_inner(guard);
818+
let inner = guard.dismiss();
819819
assert_eq!(dropped.get(), false);
820820
assert_eq!(*inner, 42);
821821
}
@@ -837,7 +837,7 @@ fn drop_guard_always_drops_value_if_closure_drop_unwinds() {
837837
// run the destructor of the value we passed, which we validate.
838838
let _ = std::panic::catch_unwind(std::panic::AssertUnwindSafe(|| {
839839
let guard = DropGuard::new(value_with_tracked_destruction, closure_that_panics_on_drop);
840-
DropGuard::into_inner(guard);
840+
guard.dismiss();
841841
}));
842842
assert!(value_was_dropped);
843843
}

0 commit comments

Comments
 (0)