Skip to content

Commit 2c9a1d9

Browse files
remove .take(10) from Range example
1 parent c9f2055 commit 2c9a1d9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/libcore/iter/range.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@ impl<A: Step> ops::Range<A> {
295295
///
296296
/// ```
297297
/// #![feature(step_by)]
298-
/// let result: Vec<_> = (0..10).step_by(2).take(10).collect();
298+
/// let result: Vec<_> = (0..10).step_by(2).collect();
299299
/// assert_eq!(result, vec![0, 2, 4, 6, 8]);
300300
/// ```
301301
#[unstable(feature = "step_by", reason = "recent addition",

0 commit comments

Comments
 (0)