Introduce BoundedVec::iter_mut (#10884)

* 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>
This commit is contained in:
Gavin Wood
2022-02-19 12:02:47 +01:00
committed by GitHub
parent b9a20ce86b
commit f3f617bd35
@@ -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> {