From 4652f9e00f0e3079b9ed40ff806829f17fd1ddcf Mon Sep 17 00:00:00 2001 From: Shawn Tabrizi Date: Wed, 2 Jun 2021 00:30:53 -0400 Subject: [PATCH] also fix bounded vec (#8987) --- frame/support/src/storage/bounded_vec.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/frame/support/src/storage/bounded_vec.rs b/frame/support/src/storage/bounded_vec.rs index fe58b5cd476a9..9575cb4bf4efb 100644 --- a/frame/support/src/storage/bounded_vec.rs +++ b/frame/support/src/storage/bounded_vec.rs @@ -75,8 +75,8 @@ impl BoundedVec { /// # 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 BoundedVec { /// # 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`].