File tree Expand file tree Collapse file tree 1 file changed +4
-9
lines changed Expand file tree Collapse file tree 1 file changed +4
-9
lines changed Original file line number Diff line number Diff line change @@ -843,11 +843,8 @@ where
843
843
let val = unsafe { & mut * slot } ;
844
844
// SAFETY: `slot` is considered pinned.
845
845
let val = unsafe { Pin :: new_unchecked ( val) } ;
846
- ( self . 1 ) ( val) . map_err ( |e| {
847
- // SAFETY: `slot` was initialized above.
848
- unsafe { core:: ptr:: drop_in_place ( slot) } ;
849
- e
850
- } )
846
+ // SAFETY: `slot` was initialized above.
847
+ ( self . 1 ) ( val) . inspect_err ( |_| unsafe { core:: ptr:: drop_in_place ( slot) } )
851
848
}
852
849
}
853
850
@@ -941,11 +938,9 @@ where
941
938
// SAFETY: All requirements fulfilled since this function is `__init`.
942
939
unsafe { self . 0 . __pinned_init ( slot) ? } ;
943
940
// SAFETY: The above call initialized `slot` and we still have unique access.
944
- ( self . 1 ) ( unsafe { & mut * slot } ) . map_err ( |e| {
941
+ ( self . 1 ) ( unsafe { & mut * slot } ) . inspect_err ( |_|
945
942
// SAFETY: `slot` was initialized above.
946
- unsafe { core:: ptr:: drop_in_place ( slot) } ;
947
- e
948
- } )
943
+ unsafe { core:: ptr:: drop_in_place ( slot) } )
949
944
}
950
945
}
951
946
You can’t perform that action at this time.
0 commit comments