Skip to content

Commit 7c9445d

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 <ojeda@kernel.org>
1 parent 868c702 commit 7c9445d

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

library/alloc/src/raw_vec.rs

-1
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)