Rollup merge of #86755 - ojeda:shrink, r=Mark-Simulacrum
alloc: `RawVec<T, A>::shrink` can be in `no_global_oom_handling`. Found in https://github.com/Rust-for-Linux/linux/pull/402. Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
This commit is contained in:
commit
9e007e71ff
@ -463,7 +463,6 @@ impl<T, A: Allocator> RawVec<T, A> {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
#[cfg(not(no_global_oom_handling))]
|
||||
fn shrink(&mut self, amount: usize) -> Result<(), TryReserveError> {
|
||||
assert!(amount <= self.capacity(), "Tried to shrink to a larger capacity");
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user