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

Commit 4652f9e

Browse files
authored
also fix bounded vec (#8987)
1 parent 9f621a9 commit 4652f9e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

frame/support/src/storage/bounded_vec.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -75,17 +75,17 @@ impl<T, S> BoundedVec<T, S> {
7575
/// # Panics
7676
///
7777
/// Panics if `index` is out of bounds.
78-
pub fn remove(&mut self, index: usize) {
79-
self.0.remove(index);
78+
pub fn remove(&mut self, index: usize) -> T {
79+
self.0.remove(index)
8080
}
8181

8282
/// Exactly the same semantics as [`Vec::swap_remove`].
8383
///
8484
/// # Panics
8585
///
8686
/// Panics if `index` is out of bounds.
87-
pub fn swap_remove(&mut self, index: usize) {
88-
self.0.swap_remove(index);
87+
pub fn swap_remove(&mut self, index: usize) -> T {
88+
self.0.swap_remove(index)
8989
}
9090

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

0 commit comments

Comments
 (0)