Update the documentation of Vec to use extend(array) instead of extend(array.iter().copied())

This commit is contained in:
Chayim Refael Friedman 2022-12-27 19:44:58 +02:00 committed by GitHub
parent b38a6d373c
commit 4df5459dd1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -166,7 +166,7 @@
/// vec[0] = 7;
/// assert_eq!(vec[0], 7);
///
/// vec.extend([1, 2, 3].iter().copied());
/// vec.extend([1, 2, 3]);
///
/// for x in &vec {
/// println!("{x}");