Skip to content
Snippets Groups Projects
Commit 29a7559f authored by Boiethios's avatar Boiethios Committed by GitHub
Browse files

Update WeakBoundedVec's remove and swap_remove (#8985)


Co-authored-by: default avatarBoiethios <felix-dev@daudre-vignier.fr>
parent e819fd03
Branches
No related merge requests found
......@@ -72,8 +72,8 @@ impl<T, S> WeakBoundedVec<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`].
......@@ -81,8 +81,8 @@ impl<T, S> WeakBoundedVec<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