Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Commit

Permalink
also fix bounded vec (#8987)
Browse files Browse the repository at this point in the history
  • Loading branch information
shawntabrizi committed Jun 2, 2021
1 parent 9f621a9 commit 4652f9e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions frame/support/src/storage/bounded_vec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,17 +75,17 @@ 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`].
///
/// # 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`].
Expand Down

0 comments on commit 4652f9e

Please sign in to comment.