diff options
| author | Miguel Ojeda <ojeda@kernel.org> | 2021-06-30 19:41:49 +0200 |
|---|---|---|
| committer | Miguel Ojeda <ojeda@kernel.org> | 2021-06-30 19:42:41 +0200 |
| commit | 7c9445d4a78909e324c5190759d1a015e7a48990 (patch) | |
| tree | e55e394082d4da1d0a8be35612bc0997679d9fdb /library/alloc/src | |
| parent | 868c702d0c9a471a28fb55f0148eb1e3e8b1dcc5 (diff) | |
| download | rust-7c9445d4a78909e324c5190759d1a015e7a48990.tar.gz rust-7c9445d4a78909e324c5190759d1a015e7a48990.zip | |
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>
Diffstat (limited to 'library/alloc/src')
| -rw-r--r-- | library/alloc/src/raw_vec.rs | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/library/alloc/src/raw_vec.rs b/library/alloc/src/raw_vec.rs index 2e2c9b76bd4..d11d4031f77 100644 --- a/library/alloc/src/raw_vec.rs +++ b/library/alloc/src/raw_vec.rs @@ -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"); |
