Skip to content

Commit

Permalink
Add into_iter for sortedvec
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffa5 committed Jun 19, 2021
1 parent 966d09e commit a2c4cb1
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions automerge-protocol/src/lib.rs
Expand Up @@ -379,6 +379,16 @@ impl<T: Ord> FromIterator<T> for SortedVec<T> {
}
}

impl<T> IntoIterator for SortedVec<T> {
type Item = T;

type IntoIter = <Vec<T> as IntoIterator>::IntoIter;

fn into_iter(self) -> Self::IntoIter {
self.0.into_iter()
}
}

#[derive(PartialEq, Debug, Clone)]
pub struct Op {
pub action: OpType,
Expand Down

0 comments on commit a2c4cb1

Please sign in to comment.