File tree Expand file tree Collapse file tree 1 file changed +2
-5
lines changed Expand file tree Collapse file tree 1 file changed +2
-5
lines changed Original file line number Diff line number Diff line change @@ -8058,8 +8058,7 @@ mod test_map {
80588058 panic ! ( "isize::MAX should trigger an overflow!" ) ;
80598059 }
80608060
8061- if let Err ( AllocError { .. } ) = empty_bytes. try_reserve ( MAX_ISIZE / 5 )
8062- {
8061+ if let Err ( AllocError { .. } ) = empty_bytes. try_reserve ( MAX_ISIZE / 5 ) {
80638062 } else {
80648063 // This may succeed if there is enough free memory. Attempt to
80658064 // allocate a few more hashmaps to ensure the allocation will fail.
@@ -8068,9 +8067,7 @@ mod test_map {
80688067 let mut empty_bytes3: HashMap < u8 , u8 > = HashMap :: new ( ) ;
80698068 let _ = empty_bytes3. try_reserve ( MAX_ISIZE / 5 ) ;
80708069 let mut empty_bytes4: HashMap < u8 , u8 > = HashMap :: new ( ) ;
8071- if let Err ( AllocError { .. } ) =
8072- empty_bytes4. try_reserve ( MAX_ISIZE / 5 )
8073- {
8070+ if let Err ( AllocError { .. } ) = empty_bytes4. try_reserve ( MAX_ISIZE / 5 ) {
80748071 } else {
80758072 panic ! ( "isize::MAX / 5 should trigger an OOM!" ) ;
80768073 }
You can’t perform that action at this time.
0 commit comments