We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents b583392 + 6e36769 commit 3751d20Copy full SHA for 3751d20
src/liballoc/vec.rs
@@ -1962,6 +1962,12 @@ impl<T> Vec<T> {
1962
1963
}
1964
1965
+/// Extend implementation that copies elements out of references before pushing them onto the Vec.
1966
+///
1967
+/// This implementation is specialized for slice iterators, where it uses [`copy_from_slice`] to
1968
+/// append the entire slice at once.
1969
1970
+/// [`copy_from_slice`]: ../../std/primitive.slice.html#method.copy_from_slice
1971
#[stable(feature = "extend_ref", since = "1.2.0")]
1972
impl<'a, T: 'a + Copy> Extend<&'a T> for Vec<T> {
1973
fn extend<I: IntoIterator<Item = &'a T>>(&mut self, iter: I) {
0 commit comments