File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff 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}
You can’t perform that action at this time.
0 commit comments