diff --git a/substrate/frame/support/src/storage/bounded_vec.rs b/substrate/frame/support/src/storage/bounded_vec.rs index fe58b5cd476a99e910374534e691fbed19c3784a..9575cb4bf4efb648eb7b872e01ecfe40c13e6fd7 100644 --- a/substrate/frame/support/src/storage/bounded_vec.rs +++ b/substrate/frame/support/src/storage/bounded_vec.rs @@ -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`].