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
No related merge requests found
......@@ -75,8 +75,8 @@ impl<T, S> BoundedVec<T, S> {
/// # Panics
///
/// Panics if `index` is out of bounds.
pub fn remove(&mut self, index: usize) {
self.0.remove(index);
pub fn remove(&mut self, index: usize) -> T {
self.0.remove(index)
}
/// Exactly the same semantics as [`Vec::swap_remove`].
......@@ -84,8 +84,8 @@ impl<T, S> BoundedVec<T, S> {
/// # Panics
///
/// Panics if `index` is out of bounds.
pub fn swap_remove(&mut self, index: usize) {
self.0.swap_remove(index);
pub fn swap_remove(&mut self, index: usize) -> T {
self.0.swap_remove(index)
}
/// 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