diff --git a/substrate/frame/support/src/storage/weak_bounded_vec.rs b/substrate/frame/support/src/storage/weak_bounded_vec.rs index 606c24de44bbf0f70afd7955884a0f46c5cabcfa..ca2271df434190077f7c7f4ed9d52e8b4d783c57 100644 --- a/substrate/frame/support/src/storage/weak_bounded_vec.rs +++ b/substrate/frame/support/src/storage/weak_bounded_vec.rs @@ -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`].