Skip to content

Commit 75113eb

Browse files
committed
alloc: RawVec<T, A>::shrink can be in no_global_oom_handling.
Found in Rust-for-Linux/linux#402. Signed-off-by: Miguel Ojeda <[email protected]>
1 parent 5aaee1c commit 75113eb

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

alloc/src/raw_vec.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -463,7 +463,6 @@ impl<T, A: Allocator> RawVec<T, A> {
463463
Ok(())
464464
}
465465

466-
#[cfg(not(no_global_oom_handling))]
467466
fn shrink(&mut self, amount: usize) -> Result<(), TryReserveError> {
468467
assert!(amount <= self.capacity(), "Tried to shrink to a larger capacity");
469468

0 commit comments

Comments
 (0)