Skip to content

Commit f744b7e

Browse files
committed
add extend to snapshot-vec
1 parent b700e10 commit f744b7e

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description = "Union-find, congruence closure, and other unification code. Based
44
license = "MIT/Apache-2.0"
55
homepage = "https://github.com/nikomatsakis/ena"
66
repository = "https://github.com/nikomatsakis/ena"
7-
version = "0.7.0"
7+
version = "0.7.1"
88
authors = ["Niko Matsakis <niko@alum.mit.edu>"]
99

1010
[features]

src/snapshot_vec.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,14 @@ impl<D: SnapshotVecDelegate> ops::IndexMut<usize> for SnapshotVec<D> {
225225
}
226226
}
227227

228+
impl<D: SnapshotVecDelegate> Extend<D::Value> for SnapshotVec<D> {
229+
fn extend<T>(&mut self, iterable: T) where T: IntoIterator<Item=D::Value> {
230+
for item in iterable {
231+
self.push(item);
232+
}
233+
}
234+
}
235+
228236
impl<D: SnapshotVecDelegate> Clone for SnapshotVec<D>
229237
where D::Value: Clone, D::Undo: Clone,
230238
{

0 commit comments

Comments
 (0)