From 4519f8290a4d7f95702e5e5a0371786158a211b5 Mon Sep 17 00:00:00 2001 From: Olivier Saut Date: Tue, 26 Feb 2013 09:56:04 +0100 Subject: [PATCH 1/2] Various typos corrected --- src/libcore/iter.rs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/libcore/iter.rs b/src/libcore/iter.rs index e48edc9c1735..3d0138720642 100644 --- a/src/libcore/iter.rs +++ b/src/libcore/iter.rs @@ -69,7 +69,7 @@ pub trait CopyableNonstrictIter { pure fn each_val(&const self, f: &fn(A) -> bool); } -// A trait for sequences that can be by imperatively pushing elements +// A trait for sequences that can be built by imperatively pushing elements // onto them. pub trait Buildable { /** @@ -198,7 +198,7 @@ pub pure fn position>(self: &IA, f: fn(&A) -> bool) } // note: 'rposition' would only make sense to provide with a bidirectional -// iter interface, such as would provide "reach" in addition to "each". as is, +// iter interface, such as would provide "reach" in addition to "each". As is, // it would have to be implemented with foldr, which is too inefficient. #[inline(always)] @@ -269,13 +269,13 @@ pub pure fn build>(builder: fn(push: pure fn(A))) /** * Builds a sequence by calling a provided function with an argument - * function that pushes an element to the back of a sequence. + * function that pushes an element to the back of the sequence. * This version takes an initial size for the sequence. * * # Arguments * * * size - An option, maybe containing initial size of the sequence - * to reserve + * to reserve. * * builder - A function that will construct the sequence. It receives * as an argument a function that will push an element * onto the sequence being constructed. @@ -290,7 +290,7 @@ pub pure fn build_sized_opt>( // Functions that combine iteration and building -/// Apply a function to each element of an iterable and return the results +/// Applies a function to each element of an iterable and returns the results. #[inline(always)] pub fn map,U,BU: Buildable>(v: &IT, f: fn(&T) -> U) -> BU { @@ -302,7 +302,7 @@ pub fn map,U,BU: Buildable>(v: &IT, f: fn(&T) -> U) } /** - * Creates and initializes a generic sequence from a function + * Creates and initializes a generic sequence from a function. * * Creates a generic sequence of size `n_elts` and initializes the elements * to the value returned by the function `op`. @@ -317,7 +317,7 @@ pub pure fn from_fn>(n_elts: uint, } /** - * Creates and initializes a generic sequence with some element + * Creates and initializes a generic sequence with some elements. * * Creates an immutable vector of size `n_elts` and initializes the elements * to the value `t`. @@ -331,7 +331,7 @@ pub pure fn from_elem>(n_elts: uint, } } -/// Appending two generic sequences +/// Appends two generic sequences. #[inline(always)] pub pure fn append,BT:Buildable>( lhs: &IT, rhs: &IT) -> BT { From 88f8868158c71b4bf2a563f2f77152c8696d2c87 Mon Sep 17 00:00:00 2001 From: Olivier Saut Date: Tue, 26 Feb 2013 10:02:53 +0100 Subject: [PATCH 2/2] Add current year in the copyright header --- src/libcore/iter.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libcore/iter.rs b/src/libcore/iter.rs index 3d0138720642..e90bbc2e6f76 100644 --- a/src/libcore/iter.rs +++ b/src/libcore/iter.rs @@ -1,4 +1,4 @@ -// Copyright 2012 The Rust Project Developers. See the COPYRIGHT +// Copyright 2012-2013 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. //