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

Commit

Permalink
Introduce BoundedVec::iter_mut (#10884)
Browse files Browse the repository at this point in the history
* Introduce iters into BoundedVec

* Fix

* Remove unneeded funcs

* Update frame/support/src/storage/bounded_vec.rs

* Update frame/support/src/storage/bounded_vec.rs

Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
  • Loading branch information
gavofyork and bkchr authored Feb 19, 2022
1 parent adc95f0 commit f72fe05
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions frame/support/src/storage/bounded_vec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,11 @@ impl<T, S> BoundedVec<T, S> {
pub fn pop(&mut self) -> Option<T> {
self.0.pop()
}

/// Exactly the same semantics as [`slice::iter_mut`].
pub fn iter_mut(&mut self) -> core::slice::IterMut<'_, T> {
self.0.iter_mut()
}
}

impl<T, S: Get<u32>> From<BoundedVec<T, S>> for Vec<T> {
Expand Down

0 comments on commit f72fe05

Please sign in to comment.