mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-27 11:38:01 +00:00
Update WeakBoundedVec's remove and swap_remove (#8985)
Co-authored-by: Boiethios <felix-dev@daudre-vignier.fr>
This commit is contained in:
@@ -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`].
|
||||
|
||||
Reference in New Issue
Block a user