1
Fork 0

Fix spelling errors in comments.

This commit is contained in:
Joseph Crail 2014-06-08 13:22:49 -04:00
parent 17ba0cf428
commit 45e56eccbe
12 changed files with 17 additions and 17 deletions

View file

@ -1532,7 +1532,7 @@ impl<T> FromVec<T> for ~[T] {
// In a post-DST world, we can attempt to reuse the Vec allocation by calling // In a post-DST world, we can attempt to reuse the Vec allocation by calling
// shrink_to_fit() on it. That may involve a reallocation+memcpy, but that's no // shrink_to_fit() on it. That may involve a reallocation+memcpy, but that's no
// diffrent than what we're doing manually here. // different than what we're doing manually here.
let vp = v.as_mut_ptr(); let vp = v.as_mut_ptr();

View file

@ -31,7 +31,7 @@
//! //!
//! ## Stability Note //! ## Stability Note
//! //!
//! These are all experimental. The inferface may change entirely, without //! These are all experimental. The interface may change entirely, without
//! warning. //! warning.
#![allow(non_camel_case_types)] #![allow(non_camel_case_types)]

View file

@ -478,7 +478,7 @@ impl TwoWaySearcher {
} }
/// The internal state of an iterator that searches for matches of a substring /// The internal state of an iterator that searches for matches of a substring
/// within a larger string using a dynamically chosed search algorithm /// within a larger string using a dynamically chosen search algorithm
#[deriving(Clone)] #[deriving(Clone)]
enum Searcher { enum Searcher {
Naive(NaiveSearcher), Naive(NaiveSearcher),
@ -1120,7 +1120,7 @@ pub trait StrSlice<'a> {
/// ///
/// That is, each returned value `(start, end)` satisfies /// That is, each returned value `(start, end)` satisfies
/// `self.slice(start, end) == sep`. For matches of `sep` within /// `self.slice(start, end) == sep`. For matches of `sep` within
/// `self` that overlap, only the indicies corresponding to the /// `self` that overlap, only the indices corresponding to the
/// first match are returned. /// first match are returned.
/// ///
/// # Example /// # Example

View file

@ -992,7 +992,7 @@ enum ParserState {
ParseObject(bool), ParseObject(bool),
// Parse ',' or ']' after an element in an object. // Parse ',' or ']' after an element in an object.
ParseObjectComma, ParseObjectComma,
// Initialial state. // Initial state.
ParseStart, ParseStart,
// Expecting the stream to end. // Expecting the stream to end.
ParseBeforeFinish, ParseBeforeFinish,
@ -1152,7 +1152,7 @@ pub struct Parser<T> {
// We maintain a stack representing where we are in the logical structure // We maintain a stack representing where we are in the logical structure
// of the JSON stream. // of the JSON stream.
stack: Stack, stack: Stack,
// A state machine is kept to make it possible to interupt and resume parsing. // A state machine is kept to make it possible to interrupt and resume parsing.
state: ParserState, state: ParserState,
} }
@ -1449,7 +1449,7 @@ impl<T: Iterator<char>> Parser<T> {
// information to return a JsonEvent. // information to return a JsonEvent.
// Manages an internal state so that parsing can be interrupted and resumed. // Manages an internal state so that parsing can be interrupted and resumed.
// Also keeps track of the position in the logical structure of the json // Also keeps track of the position in the logical structure of the json
// stream int the form of a stack that can be queried by the user usng the // stream int the form of a stack that can be queried by the user using the
// stack() method. // stack() method.
fn parse(&mut self) -> JsonEvent { fn parse(&mut self) -> JsonEvent {
loop { loop {

View file

@ -910,7 +910,7 @@ impl<'a> Reader for &'a mut Reader {
/// Returns a slice of `v` between `start` and `end`. /// Returns a slice of `v` between `start` and `end`.
/// ///
/// Similar to `slice()` except this function only bounds the sclie on the /// Similar to `slice()` except this function only bounds the slice on the
/// capacity of `v`, not the length. /// capacity of `v`, not the length.
/// ///
/// # Failure /// # Failure

View file

@ -873,7 +873,7 @@ mod tests {
pub fn sleeper() -> Process { pub fn sleeper() -> Process {
// There's a `timeout` command on windows, but it doesn't like having // There's a `timeout` command on windows, but it doesn't like having
// its output piped, so instead just ping ourselves a few times with // its output piped, so instead just ping ourselves a few times with
// gaps inbetweeen so we're sure this process is alive for awhile // gaps in between so we're sure this process is alive for awhile
Command::new("ping").arg("127.0.0.1").arg("-n").arg("1000").spawn().unwrap() Command::new("ping").arg("127.0.0.1").arg("-n").arg("1000").spawn().unwrap()
} }

View file

@ -102,7 +102,7 @@ local_data_key!(local_stdout: Box<Writer:Send>)
pub fn stdin() -> BufferedReader<StdReader> { pub fn stdin() -> BufferedReader<StdReader> {
// The default buffer capacity is 64k, but apparently windows doesn't like // The default buffer capacity is 64k, but apparently windows doesn't like
// 64k reads on stdin. See #13304 for details, but the idea is that on // 64k reads on stdin. See #13304 for details, but the idea is that on
// windows we use a slighly smaller buffer that's been seen to be // windows we use a slightly smaller buffer that's been seen to be
// acceptable. // acceptable.
if cfg!(windows) { if cfg!(windows) {
BufferedReader::with_capacity(8 * 1024, stdin_raw()) BufferedReader::with_capacity(8 * 1024, stdin_raw())

View file

@ -218,7 +218,7 @@ mod test {
iotest!(fn test_io_timer_oneshot_then_sleep() { iotest!(fn test_io_timer_oneshot_then_sleep() {
let mut timer = Timer::new().unwrap(); let mut timer = Timer::new().unwrap();
let rx = timer.oneshot(100000000000); let rx = timer.oneshot(100000000000);
timer.sleep(1); // this should inalidate rx timer.sleep(1); // this should invalidate rx
assert_eq!(rx.recv_opt(), Err(())); assert_eq!(rx.recv_opt(), Err(()));
}) })
@ -352,7 +352,7 @@ mod test {
let mut timer1 = Timer::new().unwrap(); let mut timer1 = Timer::new().unwrap();
timer1.oneshot(1); timer1.oneshot(1);
let mut timer2 = Timer::new().unwrap(); let mut timer2 = Timer::new().unwrap();
// while sleeping, the prevous timer should fire and not have its // while sleeping, the previous timer should fire and not have its
// callback do something terrible. // callback do something terrible.
timer2.sleep(2); timer2.sleep(2);
}) })
@ -361,7 +361,7 @@ mod test {
let mut timer1 = Timer::new().unwrap(); let mut timer1 = Timer::new().unwrap();
timer1.periodic(1); timer1.periodic(1);
let mut timer2 = Timer::new().unwrap(); let mut timer2 = Timer::new().unwrap();
// while sleeping, the prevous timer should fire and not have its // while sleeping, the previous timer should fire and not have its
// callback do something terrible. // callback do something terrible.
timer2.sleep(2); timer2.sleep(2);
}) })

View file

@ -636,7 +636,7 @@ pub fn from_str_bytes_common<T:NumCast+Zero+One+PartialEq+PartialOrd+Div<T,T>+
if accum_positive && accum <= last_accum { return NumStrConv::inf(); } if accum_positive && accum <= last_accum { return NumStrConv::inf(); }
if !accum_positive && accum >= last_accum { return NumStrConv::neg_inf(); } if !accum_positive && accum >= last_accum { return NumStrConv::neg_inf(); }
// Detect overflow by reversing the shift-and-add proccess // Detect overflow by reversing the shift-and-add process
if accum_positive && if accum_positive &&
(last_accum != ((accum - cast(digit as int).unwrap())/radix_gen.clone())) { (last_accum != ((accum - cast(digit as int).unwrap())/radix_gen.clone())) {
return NumStrConv::inf(); return NumStrConv::inf();

View file

@ -320,7 +320,7 @@ pub fn env_as_bytes() -> Vec<(Vec<u8>,Vec<u8>)> {
/// let key = "HOME"; /// let key = "HOME";
/// match std::os::getenv(key) { /// match std::os::getenv(key) {
/// Some(val) => println!("{}: {}", key, val), /// Some(val) => println!("{}: {}", key, val),
/// None => println!("{} is not defined in the environnement.", key) /// None => println!("{} is not defined in the environment.", key)
/// } /// }
/// ``` /// ```
pub fn getenv(n: &str) -> Option<String> { pub fn getenv(n: &str) -> Option<String> {

View file

@ -186,7 +186,7 @@ impl GenericPathUnsafe for Path {
ret ret
} }
/// See `GenericPathUnsafe::set_filename_unchecekd`. /// See `GenericPathUnsafe::set_filename_unchecked`.
/// ///
/// # Failure /// # Failure
/// ///

View file

@ -243,7 +243,7 @@ mod imp {
// EINVAL means |stack_size| is either too small or not a // EINVAL means |stack_size| is either too small or not a
// multiple of the system page size. Because it's definitely // multiple of the system page size. Because it's definitely
// >= PTHREAD_STACK_MIN, it must be an alignment issue. // >= PTHREAD_STACK_MIN, it must be an alignment issue.
// Round up to the neareast page and try again. // Round up to the nearest page and try again.
let page_size = os::page_size(); let page_size = os::page_size();
let stack_size = (stack_size + page_size - 1) & (-(page_size - 1) - 1); let stack_size = (stack_size + page_size - 1) & (-(page_size - 1) - 1);
assert_eq!(pthread_attr_setstacksize(&mut attr, stack_size as libc::size_t), 0); assert_eq!(pthread_attr_setstacksize(&mut attr, stack_size as libc::size_t), 0);