diff options
| author | Joseph Crail <jbcrail@gmail.com> | 2014-04-21 00:49:39 -0400 |
|---|---|---|
| committer | Joseph Crail <jbcrail@gmail.com> | 2014-04-21 00:49:39 -0400 |
| commit | 809f13ea9441d972b5777a9c8bf837add9484a45 (patch) | |
| tree | 5d96475ab271730a20ff6532778b632504ab0c81 /src/libstd | |
| parent | 30348f46757ad0e68f69eccd31e5de345a010ac0 (diff) | |
| download | rust-809f13ea9441d972b5777a9c8bf837add9484a45.tar.gz rust-809f13ea9441d972b5777a9c8bf837add9484a45.zip | |
Fix misspellings in comments.
Diffstat (limited to 'src/libstd')
| -rw-r--r-- | src/libstd/cmp.rs | 4 | ||||
| -rw-r--r-- | src/libstd/iter.rs | 2 | ||||
| -rw-r--r-- | src/libstd/macros.rs | 2 | ||||
| -rw-r--r-- | src/libstd/ptr.rs | 2 | ||||
| -rw-r--r-- | src/libstd/raw.rs | 2 | ||||
| -rw-r--r-- | src/libstd/result.rs | 4 | ||||
| -rw-r--r-- | src/libstd/rt/local_ptr.rs | 2 | ||||
| -rw-r--r-- | src/libstd/str.rs | 6 | ||||
| -rw-r--r-- | src/libstd/strbuf.rs | 2 | ||||
| -rw-r--r-- | src/libstd/vec.rs | 4 |
10 files changed, 15 insertions, 15 deletions
diff --git a/src/libstd/cmp.rs b/src/libstd/cmp.rs index e39ab4144fd..a6d6649aca0 100644 --- a/src/libstd/cmp.rs +++ b/src/libstd/cmp.rs @@ -26,7 +26,7 @@ //! //! // Our implementation of `Eq` to support `==` and `!=`. //! impl Eq for SketchyNum { -//! // Our custom eq allows numbers which are near eachother to be equal! :D +//! // Our custom eq allows numbers which are near each other to be equal! :D //! fn eq(&self, other: &SketchyNum) -> bool { //! (self.num - other.num).abs() < 5 //! } @@ -283,7 +283,7 @@ mod test { // Our implementation of `Eq` to support `==` and `!=`. impl Eq for SketchyNum { - // Our custom eq allows numbers which are near eachother to be equal! :D + // Our custom eq allows numbers which are near each other to be equal! :D fn eq(&self, other: &SketchyNum) -> bool { (self.num - other.num).abs() < 5 } diff --git a/src/libstd/iter.rs b/src/libstd/iter.rs index 1c7579e6b8e..7a04303268b 100644 --- a/src/libstd/iter.rs +++ b/src/libstd/iter.rs @@ -937,7 +937,7 @@ impl<A: TotalOrd, T: Iterator<A>> OrdIterator<A> for T { loop { // `first` and `second` are the two next elements we want to look at. // We first compare `first` and `second` (#1). The smaller one is then compared to - // current mininum (#2). The larger one is compared to current maximum (#3). This + // current minimum (#2). The larger one is compared to current maximum (#3). This // way we do 3 comparisons for 2 elements. let first = match self.next() { None => break, diff --git a/src/libstd/macros.rs b/src/libstd/macros.rs index 06a6a6da796..dbaef335804 100644 --- a/src/libstd/macros.rs +++ b/src/libstd/macros.rs @@ -24,7 +24,7 @@ /// which is transmitted. /// /// The multi-argument form of this macro fails with a string and has the -/// `format!` sytnax for building a string. +/// `format!` syntax for building a string. /// /// # Example /// diff --git a/src/libstd/ptr.rs b/src/libstd/ptr.rs index 61461096ed9..f70715ed756 100644 --- a/src/libstd/ptr.rs +++ b/src/libstd/ptr.rs @@ -15,7 +15,7 @@ //! an unsafe pointer when safe pointers are unsuitable; //! checking for null; and converting back to safe pointers. //! As a result, there is not yet an abundance of library code -//! for working with unsafe poniters, and in particular, +//! for working with unsafe pointers, and in particular, //! since pointer math is fairly uncommon in Rust, it is not //! all that convenient. //! diff --git a/src/libstd/raw.rs b/src/libstd/raw.rs index b285b42ee5e..9b0463089d0 100644 --- a/src/libstd/raw.rs +++ b/src/libstd/raw.rs @@ -15,7 +15,7 @@ //! They can be used as targets of transmutes in unsafe code for manipulating //! the raw representations directly. //! -//! Their definitition should always match the ABI defined in `rustc::back::abi`. +//! Their definition should always match the ABI defined in `rustc::back::abi`. use cast; diff --git a/src/libstd/result.rs b/src/libstd/result.rs index 0f993598747..7080da266f6 100644 --- a/src/libstd/result.rs +++ b/src/libstd/result.rs @@ -103,7 +103,7 @@ //! ~~~ //! //! *Note: The actual definition of `Writer` uses `IoResult`, which -//! is just a synonymn for `Result<T, IoError>`.* +//! is just a synonym for `Result<T, IoError>`.* //! //! This method doesn`t produce a value, but the write may //! fail. It's crucial to handle the error case, and *not* write @@ -255,7 +255,7 @@ //! handling requires encapsulating fallable code in a task. Calling //! the `fail!` macro, or invoking `fail!` indirectly should be //! avoided as an error reporting strategy. Failure is only for -//! unrecovereable errors and a failing task is typically the sign of +//! unrecoverable errors and a failing task is typically the sign of //! a bug. //! //! A module that instead returns `Results` is alerting the caller diff --git a/src/libstd/rt/local_ptr.rs b/src/libstd/rt/local_ptr.rs index ff82be97489..f60cfa23e81 100644 --- a/src/libstd/rt/local_ptr.rs +++ b/src/libstd/rt/local_ptr.rs @@ -374,7 +374,7 @@ pub mod native { pub fn maybe_tls_key() -> Option<tls::Key> { unsafe { // NB: This is a little racy because, while the key is - // initalized under a mutex and it's assumed to be initalized + // initialized under a mutex and it's assumed to be initialized // in the Scheduler ctor by any thread that needs to use it, // we are not accessing the key under a mutex. Threads that // are not using the new Scheduler but still *want to check* diff --git a/src/libstd/str.rs b/src/libstd/str.rs index 3c03bddb293..672442bb931 100644 --- a/src/libstd/str.rs +++ b/src/libstd/str.rs @@ -662,7 +662,7 @@ impl<'a> Iterator<char> for Normalizations<'a> { /// /// # Return value /// -/// The original string with all occurances of `from` replaced with `to` +/// The original string with all occurrences of `from` replaced with `to` pub fn replace(s: &str, from: &str, to: &str) -> ~str { let mut result = StrBuf::new(); let mut last_end = 0; @@ -1443,7 +1443,7 @@ pub mod raw { /// Sets the length of a string /// /// This will explicitly set the size of the string, without actually - /// modifing its buffers, so it is up to the caller to ensure that + /// modifying its buffers, so it is up to the caller to ensure that /// the string is actually the specified size. #[test] fn test_from_buf_len() { @@ -2022,7 +2022,7 @@ pub trait StrSlice<'a> { /// /// # Return value /// - /// The original string with all occurances of `from` replaced with `to`. + /// The original string with all occurrences of `from` replaced with `to`. /// /// # Example /// diff --git a/src/libstd/strbuf.rs b/src/libstd/strbuf.rs index 873b7293032..86da11aceda 100644 --- a/src/libstd/strbuf.rs +++ b/src/libstd/strbuf.rs @@ -31,7 +31,7 @@ pub struct StrBuf { } impl StrBuf { - /// Creates a new string buffer initalized with the empty string. + /// Creates a new string buffer initialized with the empty string. #[inline] pub fn new() -> StrBuf { StrBuf { diff --git a/src/libstd/vec.rs b/src/libstd/vec.rs index 585bed83101..c5f3206d9d5 100644 --- a/src/libstd/vec.rs +++ b/src/libstd/vec.rs @@ -135,7 +135,7 @@ impl<T> Vec<T> { Vec { len: length, cap: capacity, ptr: ptr } } - /// Consumes the `Vec`, partitioning it based on a predcate. + /// Consumes the `Vec`, partitioning it based on a predicate. /// /// Partitions the `Vec` into two `Vec`s `(A,B)`, where all elements of `A` /// satisfy `f` and all elements of `B` do not. The order of elements is @@ -279,7 +279,7 @@ impl<T: Clone> Vec<T> { *self.get_mut(index) = value; } - /// Partitions a vector based on a predcate. + /// Partitions a vector based on a predicate. /// /// Clones the elements of the vector, partitioning them into two `Vec`s /// `(A,B)`, where all elements of `A` satisfy `f` and all elements of `B` |
