Skip to content

Commit

Permalink
Merge pull request #83 from LNP-BP/develop
Browse files Browse the repository at this point in the history
Support iter_mut for strict_encoding LargeVec and MediumVec types
  • Loading branch information
dr-orlovsky authored Jun 12, 2022
2 parents 5d89ff4 + 1b54466 commit be8ccd4
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion strict_encoding/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "strict_encoding"
version = "1.8.7"
version = "1.8.8"
license = "Apache-2.0"
authors = ["Dr. Maxim Orlovsky <[email protected]>"]
description = "Strict encoding: deterministic binary serialization for networking & client-side validation"
Expand Down
6 changes: 6 additions & 0 deletions strict_encoding/src/collections.rs
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,9 @@ where
/// 'length'.
pub fn len_u32(&self) -> u32 { self.0.len() as u32 }

/// Returns iterator over mutable elements of the collection.
pub fn iter_mut(&mut self) -> std::slice::IterMut<T> { self.0.iter_mut() }

/// Appends an element to the back of a collection.
///
/// # Errors
Expand Down Expand Up @@ -413,6 +416,9 @@ where
.expect("MediumVec inner size guarantees are broken")
}

/// Returns iterator over mutable elements of the collection.
pub fn iter_mut(&mut self) -> std::slice::IterMut<T> { self.0.iter_mut() }

/// Appends an element to the back of a collection.
///
/// # Errors
Expand Down

0 comments on commit be8ccd4

Please sign in to comment.