diff options
| author | Johannes Oertel <johannes.oertel@uni-due.de> | 2015-06-03 12:38:42 +0200 |
|---|---|---|
| committer | Johannes Oertel <johannes.oertel@uni-due.de> | 2015-06-08 12:05:33 +0200 |
| commit | b36ed7d2edf68453c0344eb3cd55281e48c96ecb (patch) | |
| tree | e1bda74459df66821d1182fb397048f24e3829fa /src/libcollections/binary_heap.rs | |
| parent | a5979be9fefe671fa81ec70720234602f8112bec (diff) | |
| download | rust-b36ed7d2edf68453c0344eb3cd55281e48c96ecb.tar.gz rust-b36ed7d2edf68453c0344eb3cd55281e48c96ecb.zip | |
Implement RFC 839
Closes #25976.
Diffstat (limited to 'src/libcollections/binary_heap.rs')
| -rw-r--r-- | src/libcollections/binary_heap.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/libcollections/binary_heap.rs b/src/libcollections/binary_heap.rs index 00e4002f82f..97bdd8e6a6e 100644 --- a/src/libcollections/binary_heap.rs +++ b/src/libcollections/binary_heap.rs @@ -760,3 +760,10 @@ impl<T: Ord> Extend<T> for BinaryHeap<T> { } } } + +#[stable(feature = "extend_ref", since = "1.2.0")] +impl<'a, T: 'a + Ord + Copy> Extend<&'a T> for BinaryHeap<T> { + fn extend<I: IntoIterator<Item=&'a T>>(&mut self, iter: I) { + self.extend(iter.into_iter().cloned()); + } +} |
