Skip to content

Commit

Permalink
add extend to snapshot-vec
Browse files Browse the repository at this point in the history
  • Loading branch information
nikomatsakis committed Jul 16, 2017
1 parent b700e10 commit f744b7e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ description = "Union-find, congruence closure, and other unification code. Based
license = "MIT/Apache-2.0"
homepage = "https://github.com/nikomatsakis/ena"
repository = "https://github.com/nikomatsakis/ena"
version = "0.7.0"
version = "0.7.1"
authors = ["Niko Matsakis <niko@alum.mit.edu>"]

[features]
Expand Down
8 changes: 8 additions & 0 deletions src/snapshot_vec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,14 @@ impl<D: SnapshotVecDelegate> ops::IndexMut<usize> for SnapshotVec<D> {
}
}

impl<D: SnapshotVecDelegate> Extend<D::Value> for SnapshotVec<D> {
fn extend<T>(&mut self, iterable: T) where T: IntoIterator<Item=D::Value> {
for item in iterable {
self.push(item);
}
}
}

impl<D: SnapshotVecDelegate> Clone for SnapshotVec<D>
where D::Value: Clone, D::Undo: Clone,
{
Expand Down

0 comments on commit f744b7e

Please sign in to comment.