Skip to content
Snippets Groups Projects
Commit 554a0cb2 authored by Shawn Tabrizi's avatar Shawn Tabrizi Committed by GitHub
Browse files

also fix bounded vec (#8987)

parent e63730b7
Branches
No related merge requests found
...@@ -75,8 +75,8 @@ impl<T, S> BoundedVec<T, S> { ...@@ -75,8 +75,8 @@ impl<T, S> BoundedVec<T, S> {
/// # Panics /// # Panics
/// ///
/// Panics if `index` is out of bounds. /// Panics if `index` is out of bounds.
pub fn remove(&mut self, index: usize) { pub fn remove(&mut self, index: usize) -> T {
self.0.remove(index); self.0.remove(index)
} }
/// Exactly the same semantics as [`Vec::swap_remove`]. /// Exactly the same semantics as [`Vec::swap_remove`].
...@@ -84,8 +84,8 @@ impl<T, S> BoundedVec<T, S> { ...@@ -84,8 +84,8 @@ impl<T, S> BoundedVec<T, S> {
/// # Panics /// # Panics
/// ///
/// Panics if `index` is out of bounds. /// Panics if `index` is out of bounds.
pub fn swap_remove(&mut self, index: usize) { pub fn swap_remove(&mut self, index: usize) -> T {
self.0.swap_remove(index); self.0.swap_remove(index)
} }
/// Exactly the same semantics as [`Vec::retain`]. /// Exactly the same semantics as [`Vec::retain`].
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment