Fix misspellings in comments.

This commit is contained in:
Joseph Crail 2014-04-21 00:49:39 -04:00
parent 30348f4675
commit 809f13ea94
33 changed files with 53 additions and 53 deletions

View file

@ -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
}

View file

@ -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,

View file

@ -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
///

View file

@ -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.
//!

View file

@ -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;

View file

@ -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

View file

@ -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*

View file

@ -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
///

View file

@ -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 {

View file

@ -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`