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

Commit 45f1630

Browse files
BoiethiosBoiethios
andauthored
Update WeakBoundedVec's remove and swap_remove (#8985)
Co-authored-by: Boiethios <[email protected]>
1 parent d8b3fce commit 45f1630

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

frame/support/src/storage/weak_bounded_vec.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,17 +72,17 @@ impl<T, S> WeakBoundedVec<T, S> {
7272
/// # Panics
7373
///
7474
/// Panics if `index` is out of bounds.
75-
pub fn remove(&mut self, index: usize) {
76-
self.0.remove(index);
75+
pub fn remove(&mut self, index: usize) -> T {
76+
self.0.remove(index)
7777
}
7878

7979
/// Exactly the same semantics as [`Vec::swap_remove`].
8080
///
8181
/// # Panics
8282
///
8383
/// Panics if `index` is out of bounds.
84-
pub fn swap_remove(&mut self, index: usize) {
85-
self.0.swap_remove(index);
84+
pub fn swap_remove(&mut self, index: usize) -> T {
85+
self.0.swap_remove(index)
8686
}
8787

8888
/// Exactly the same semantics as [`Vec::retain`].

0 commit comments

Comments
 (0)