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.
1 parent 7820135 commit 676e4f1Copy full SHA for 676e4f1
library/core/src/iter/adapters/chain.rs
@@ -6,6 +6,17 @@ use crate::usize;
6
///
7
/// This `struct` is created by [`Iterator::chain`]. See its documentation
8
/// for more.
9
+///
10
+/// # Examples
11
12
+/// ```
13
+/// use std::iter::Chain;
14
+/// use std::slice::Iter;
15
16
+/// let a1 = [1, 2, 3];
17
+/// let a2 = [4, 5, 6];
18
+/// let iter: Chain<Iter<_>, Iter<_>> = a1.iter().chain(a2.iter());
19
20
#[derive(Clone, Debug)]
21
#[must_use = "iterators are lazy and do nothing unless consumed"]
22
#[stable(feature = "rust1", since = "1.0.0")]
0 commit comments