Skip to content

Spell check #10974

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Dec 15, 2013
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/libextra/arc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ impl<T:Freeze + Send> MutexArc<T> {
* might contain nested MutexArcs inside.
*
* The purpose of this is to offer a safe implementation of MutexArc to be
* used instead of RWArc in cases where no readers are needed and sightly
* used instead of RWArc in cases where no readers are needed and slightly
* better performance is required.
*
* Both methods have the same failure behaviour as unsafe_access and
Expand Down
6 changes: 3 additions & 3 deletions src/libextra/getopts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
//! file name following `-o`, and accepts both `-h` and `--help` as optional flags.
//!
//! ~~~{.rust}
//! exter mod extra;
//! extern mod extra;
//! use extra::getopts::*;
//! use std::os;
//!
Expand Down Expand Up @@ -114,7 +114,7 @@ pub enum Occur {
pub struct Opt {
/// Name of the option
name: Name,
/// Wheter it has an argument
/// Whether it has an argument
hasarg: HasArg,
/// How often it can occur
occur: Occur,
Expand Down Expand Up @@ -154,7 +154,7 @@ pub enum Fail_ {
UnexpectedArgument(~str),
}

/// The type of failure that occured.
/// The type of failure that occurred.
#[deriving(Eq)]
#[allow(missing_doc)]
pub enum FailType {
Expand Down
2 changes: 1 addition & 1 deletion src/libextra/tempfile.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ use std::io;
use std::io::fs;

/// A wrapper for a path to temporary directory implementing automatic
/// scope-pased deletion.
/// scope-based deletion.
pub struct TempDir {
priv path: Option<Path>
}
Expand Down
8 changes: 4 additions & 4 deletions src/libextra/uuid.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ identifiers to entities without requiring a central allocating authority.

They are particularly useful in distributed systems, though can be used in
disparate areas, such as databases and network protocols. Typically a UUID is
displayed in a readable string form as a sequence of hexadecimals digits,
displayed in a readable string form as a sequence of hexadecimal digits,
separated into groups by hyphens.

The uniqueness property is not strictly guaranteed, however for all practical
Expand Down Expand Up @@ -89,11 +89,11 @@ pub enum UuidVersion {
/// The reserved variants of UUIDs
#[deriving(Eq)]
pub enum UuidVariant {
/// Reserved by the NCS for backward compatability
/// Reserved by the NCS for backward compatibility
VariantNCS,
/// As described in the RFC4122 Specification (default)
VariantRFC4122,
/// Resreved by Microsoft for backward compatability
/// Reserved by Microsoft for backward compatibility
VariantMicrosoft,
/// Reserved for future expansion
VariantFuture,
Expand Down Expand Up @@ -313,7 +313,7 @@ impl Uuid {
str::from_utf8_owned(s)
}

/// Returns a string of hexadecimal digits, separated into groups with a hypen
/// Returns a string of hexadecimal digits, separated into groups with a hyphen.
///
/// Example: `550e8400-e29b-41d4-a716-446655440000`
pub fn to_hyphenated_str(&self) -> ~str {
Expand Down
6 changes: 3 additions & 3 deletions src/librustuv/idle.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ use std::libc::{c_int, c_void};

use uvll;
use super::{Loop, UvHandle};
use std::rt::rtio::{Callback, PausibleIdleCallback};
use std::rt::rtio::{Callback, PausableIdleCallback};

pub struct IdleWatcher {
handle: *uvll::uv_idle_t,
Expand Down Expand Up @@ -63,7 +63,7 @@ impl IdleWatcher {
}
}

impl PausibleIdleCallback for IdleWatcher {
impl PausableIdleCallback for IdleWatcher {
fn pause(&mut self) {
if self.idle_flag == true {
assert_eq!(unsafe {uvll::uv_idle_stop(self.handle) }, 0);
Expand Down Expand Up @@ -99,7 +99,7 @@ impl Drop for IdleWatcher {
mod test {
use super::*;
use std::rt::tube::Tube;
use std::rt::rtio::{Callback, PausibleIdleCallback};
use std::rt::rtio::{Callback, PausableIdleCallback};
use super::super::local_loop;

struct MyCallback(Tube<int>, int);
Expand Down
4 changes: 2 additions & 2 deletions src/librustuv/uvio.rs
Original file line number Diff line number Diff line change
Expand Up @@ -153,8 +153,8 @@ impl EventLoop for UvEventLoop {
IdleWatcher::onetime(self.uvio.uv_loop(), f);
}

fn pausible_idle_callback(&mut self, cb: ~Callback) -> ~PausibleIdleCallback {
IdleWatcher::new(self.uvio.uv_loop(), cb) as ~PausibleIdleCallback
fn pausable_idle_callback(&mut self, cb: ~Callback) -> ~PausableIdleCallback {
IdleWatcher::new(self.uvio.uv_loop(), cb) as ~PausableIdleCallback
}

fn remote_callback(&mut self, f: ~Callback) -> ~RemoteCallback {
Expand Down
4 changes: 2 additions & 2 deletions src/libstd/cell.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ impl<T> RefCell<T> {

/// Mutably borrows the wrapped value.
///
/// The borrow lasts untile the returned `RefMut` exits scope. The value
/// The borrow lasts until the returned `RefMut` exits scope. The value
/// cannot be borrowed while this borrow is active.
///
/// Returns `None` if the value is currently borrowed.
Expand All @@ -98,7 +98,7 @@ impl<T> RefCell<T> {

/// Mutably borrows the wrapped value.
///
/// The borrow lasts untile the returned `RefMut` exits scope. The value
/// The borrow lasts until the returned `RefMut` exits scope. The value
/// cannot be borrowed while this borrow is active.
///
/// # Failure
Expand Down
4 changes: 2 additions & 2 deletions src/libstd/char.rs
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ fn decompose_hangul(s: char, f: |char|) {
}
}

/// Returns the canonical decompostion of a character
/// Returns the canonical decomposition of a character.
pub fn decompose_canonical(c: char, f: |char|) {
if (c as uint) < S_BASE || (c as uint) >= (S_BASE + S_COUNT) {
decompose::canonical(c, f);
Expand All @@ -265,7 +265,7 @@ pub fn decompose_canonical(c: char, f: |char|) {
}
}

/// Returns the compatibility decompostion of a character
/// Returns the compatibility decomposition of a character.
pub fn decompose_compatible(c: char, f: |char|) {
if (c as uint) < S_BASE || (c as uint) >= (S_BASE + S_COUNT) {
decompose::compatibility(c, f);
Expand Down
4 changes: 2 additions & 2 deletions src/libstd/clone.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ pub trait Clone {
/// Perform copy-assignment from `source`.
///
/// `a.clone_from(&b)` is equivalent to `a = b.clone()` in functionality,
/// but can be overriden to reuse the resources of `a` to avoid unnecessary
/// but can be overridden to reuse the resources of `a` to avoid unnecessary
/// allocations.
#[inline(always)]
fn clone_from(&mut self, source: &Self) {
Expand Down Expand Up @@ -141,7 +141,7 @@ pub trait DeepClone: Clone {
/// Perform deep copy-assignment from `source`.
///
/// `a.deep_clone_from(&b)` is equivalent to `a = b.deep_clone()` in
/// functionality, but can be overriden to reuse the resources of `a` to
/// functionality, but can be overridden to reuse the resources of `a` to
/// avoid unnecessary allocations.
#[inline(always)]
fn deep_clone_from(&mut self, source: &Self) {
Expand Down
2 changes: 1 addition & 1 deletion src/libstd/condition.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ pub struct Handler<T, U> {
/// the condition (useful for debugging).
///
/// This struct should never be created directly, but rather only through the
/// `condition!` macro provided to all libraries using libstd.
/// `condition!` macro provided to all libraries using `std`.
pub struct Condition<T, U> {
/// Name of the condition handler
name: &'static str,
Expand Down
6 changes: 3 additions & 3 deletions src/libstd/fmt/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -606,9 +606,9 @@ pub fn writeln(output: &mut io::Writer, args: &Arguments) {
/// See the documentation for `format` for why this function is unsafe and care
/// should be taken if calling it manually.
///
/// Thankfully the rust compiler provides the macro `fmtf!` which will perform
/// all of this validation at compile-time and provides a safe interface for
/// invoking this function.
/// Thankfully the rust compiler provides macros like `write!` and
/// `format_args!` which perform all of this validation at compile-time
/// and provide a safe interface for invoking this function.
///
/// # Arguments
///
Expand Down
4 changes: 2 additions & 2 deletions src/libstd/io/buffered.rs
Original file line number Diff line number Diff line change
Expand Up @@ -202,8 +202,8 @@ impl<W: Writer> Decorator<W> for BufferedWriter<W> {
fn inner_mut_ref<'a>(&'a mut self) -> &'a mut W { &mut self.inner }
}

/// Wraps a Writer and buffers output to it, flushing whenever a newline (0xa,
/// '\n') is detected.
/// Wraps a Writer and buffers output to it, flushing whenever a newline (`0x0a`,
/// `'\n'`) is detected.
///
/// Note that this structure does NOT flush the output when dropped.
pub struct LineBufferedWriter<W> {
Expand Down
14 changes: 7 additions & 7 deletions src/libstd/io/fs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ pub fn unlink(path: &Path) {
/// directory, etc. This function will traverse symlinks to query
/// information about the destination file.
///
/// Returns a fully-filled out stat structure on succes, and on failure it
/// Returns a fully-filled out stat structure on success, and on failure it
/// will return a dummy stat structure (it is expected that the condition
/// raised is handled as well).
///
Expand Down Expand Up @@ -342,7 +342,7 @@ pub fn rename(from: &Path, to: &Path) {
///
/// # Errors
///
/// Will raise an `io_error` condition is the following situtations, but is
/// Will raise an `io_error` condition is the following situations, but is
/// not limited to just these cases:
///
/// * The `from` path is not a file
Expand Down Expand Up @@ -391,7 +391,7 @@ pub fn copy(from: &Path, to: &Path) {
///
/// # Errors
///
/// If this funciton encounters an I/O error, it will raise on the `io_error`
/// If this function encounters an I/O error, it will raise on the `io_error`
/// condition. Some possible error situations are not having the permission to
/// change the attributes of a file or the file not existing.
pub fn chmod(path: &Path, mode: io::FilePermission) {
Expand All @@ -402,7 +402,7 @@ pub fn chmod(path: &Path, mode: io::FilePermission) {
///
/// # Errors
///
/// This funtion will raise on the `io_error` condition on failure.
/// This function will raise on the `io_error` condition on failure.
pub fn chown(path: &Path, uid: int, gid: int) {
io_raise(|io| io.fs_chown(&path.to_c_str(), uid, gid));
}
Expand Down Expand Up @@ -448,7 +448,7 @@ pub fn readlink(path: &Path) -> Option<Path> {
///
/// let p = Path::new("/some/dir");
/// fs::mkdir(&p, S_IRWXU as int);
/// // If we got here, our directory exists! Horray!
/// // If we got here, our directory exists! Hooray!
///
/// # Errors
///
Expand Down Expand Up @@ -665,7 +665,7 @@ impl path::Path {
io::result(|| self.stat()).is_ok()
}

/// Whether the underlying implemention (be it a file path, or something
/// Whether the underlying implementation (be it a file path, or something
/// else) points at a "regular file" on the FS. Will return false for paths
/// to non-existent locations or directories or other non-regular files
/// (named pipes, etc).
Expand All @@ -680,7 +680,7 @@ impl path::Path {
}
}

/// Whether the underlying implemention (be it a file path,
/// Whether the underlying implementation (be it a file path,
/// or something else) is pointing at a directory in the underlying FS.
/// Will return false for paths to non-existent locations or if the item is
/// not a directory (eg files, named pipes, links, etc)
Expand Down
6 changes: 3 additions & 3 deletions src/libstd/io/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -835,7 +835,7 @@ pub trait Writer {
/// Flush this output stream, ensuring that all intermediately buffered
/// contents reach their destination.
///
/// This is by default a no-op and implementors of the `Writer` trait should
/// This is by default a no-op and implementers of the `Writer` trait should
/// decide whether their stream needs to be buffered or not.
fn flush(&mut self) {}

Expand Down Expand Up @@ -1057,7 +1057,7 @@ pub trait Buffer: Reader {
}
}

/// Reads a sequence of bytes leading up to a specified delimeter. Once the
/// Reads a sequence of bytes leading up to a specified delimiter. Once the
/// specified byte is encountered, reading ceases and the bytes up to and
/// including the delimiter are returned.
///
Expand Down Expand Up @@ -1156,7 +1156,7 @@ pub trait Seek {
/// A listener is a value that can consume itself to start listening for connections.
/// Doing so produces some sort of Acceptor.
pub trait Listener<T, A: Acceptor<T>> {
/// Spin up the listener and start queueing incoming connections
/// Spin up the listener and start queuing incoming connections
///
/// # Failure
///
Expand Down
2 changes: 1 addition & 1 deletion src/libstd/io/native/process.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ impl Process {
/// * prog - the program to run
/// * args - the arguments to pass to the program, not including the program
/// itself
/// * env - an optional envrionment to specify for the child process. If
/// * env - an optional environment to specify for the child process. If
/// this value is `None`, then the child will inherit the parent's
/// environment
/// * cwd - an optionally specified current working directory of the child,
Expand Down
2 changes: 1 addition & 1 deletion src/libstd/io/signal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ pub enum Signum {
Break = 21i,
/// Equivalent to SIGHUP, delivered when the user closes the terminal
/// window. On delivery of HangUp, the program is given approximately
/// 10 seconds to perfom any cleanup. After that, Windows will
/// 10 seconds to perform any cleanup. After that, Windows will
/// unconditionally terminate it.
HangUp = 1i,
/// Equivalent to SIGINT, delivered when the user presses Ctrl-c.
Expand Down
4 changes: 2 additions & 2 deletions src/libstd/iter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Composable external iterators
# The `Iterator` trait

This module defines Rust's core iteration trait. The `Iterator` trait has one
un-implemented method, `next`. All other methods are derived through default
unimplemented method, `next`. All other methods are derived through default
methods to perform operations such as `zip`, `chain`, `enumerate`, and `fold`.

The goal of this module is to unify iteration across all containers in Rust.
Expand Down Expand Up @@ -1688,7 +1688,7 @@ impl<A, T: RandomAccessIterator<A>> RandomAccessIterator<A> for Fuse<T> {

impl<T> Fuse<T> {
/// Resets the fuse such that the next call to .next() or .next_back() will
/// call the underlying iterator again even if it prevously returned None.
/// call the underlying iterator again even if it previously returned None.
#[inline]
pub fn reset_fuse(&mut self) {
self.done = false
Expand Down
2 changes: 1 addition & 1 deletion src/libstd/local_data.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ the TLS slot. Useful for dynamic variables, singletons, and interfacing with
foreign code with bad callback interfaces.

To declare a new key for storing local data of a particular type, use the
`local_data_key!` macro. This macro will expand to a `static` item apppriately
`local_data_key!` macro. This macro will expand to a `static` item appropriately
named and annotated. This name is then passed to the functions in this module to
modify/read the slot specified by the key.

Expand Down
4 changes: 2 additions & 2 deletions src/libstd/num/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ pub trait Fractional: Num
pub trait Algebraic {
/// Raise a number to a power.
fn pow(&self, n: &Self) -> Self;
/// Take the squre root of a number.
/// Take the square root of a number.
fn sqrt(&self) -> Self;
/// Take the reciprocal (inverse) square root of a number, `1/sqrt(x)`.
fn rsqrt(&self) -> Self;
Expand All @@ -229,7 +229,7 @@ pub trait Algebraic {
/// assert_eq!(sixteen, 16.0);
/// ```
#[inline(always)] pub fn pow<T: Algebraic>(value: T, n: T) -> T { value.pow(&n) }
/// Take the squre root of a number.
/// Take the square root of a number.
#[inline(always)] pub fn sqrt<T: Algebraic>(value: T) -> T { value.sqrt() }
/// Take the reciprocal (inverse) square root of a number, `1/sqrt(x)`.
#[inline(always)] pub fn rsqrt<T: Algebraic>(value: T) -> T { value.rsqrt() }
Expand Down
2 changes: 1 addition & 1 deletion src/libstd/ops.rs
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@ pub trait BitOr<RHS,Result> {
* # Example
*
* A trivial implementation of `BitXor`. When `Foo ^ Foo` happens, it ends up
* calling `bixtor`, and therefore, `main` prints `Bitwise Xor-ing!`.
* calling `bitxor`, and therefore, `main` prints `Bitwise Xor-ing!`.
*
* ```
* struct Foo;
Expand Down
6 changes: 3 additions & 3 deletions src/libstd/rand/distributions/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ pub trait Sample<Support> {

/// `Sample`s that do not require keeping track of state.
///
/// Since no state is recored, each sample is (statistically)
/// Since no state is recorded, each sample is (statistically)
/// independent of all others, assuming the `Rng` used has this
/// property.
// XXX maybe having this separate is overkill (the only reason is to
Expand Down Expand Up @@ -84,15 +84,15 @@ pub struct Weighted<T> {
/// is to be chosen: higher weight is more likely.
///
/// The `Clone` restriction is a limitation of the `Sample` and
/// `IndepedentSample` traits. Note that `&T` is (cheaply) `Clone` for
/// `IndependentSample` traits. Note that `&T` is (cheaply) `Clone` for
/// all `T`, as is `uint`, so one can store references or indices into
/// another vector.
///
/// # Example
///
/// ```rust
/// use std::rand;
/// use std::rand::distributions::{Weighted, WeightedChoice, IndepedentSample};
/// use std::rand::distributions::{Weighted, WeightedChoice, IndependentSample};
///
/// fn main() {
/// let wc = WeightedChoice::new(~[Weighted { weight: 2, item: 'a' },
Expand Down
2 changes: 1 addition & 1 deletion src/libstd/rand/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ pub trait Rng {
/// Fill `dest` with random data.
///
/// This has a default implementation in terms of `next_u64` and
/// `next_u32`, but should be overriden by implementations that
/// `next_u32`, but should be overridden by implementations that
/// offer a more efficient solution than just calling those
/// methods repeatedly.
///
Expand Down
Loading