Skip to content

Commit ef7969e

Browse files
committed
auto merge of #10974 : huonw/rust/spellck, r=alexcrichton
2 parents 09bfb3b + b0bcbbb commit ef7969e

File tree

28 files changed

+83
-82
lines changed

28 files changed

+83
-82
lines changed

src/libextra/arc.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ impl<T:Freeze + Send> MutexArc<T> {
276276
* might contain nested MutexArcs inside.
277277
*
278278
* The purpose of this is to offer a safe implementation of MutexArc to be
279-
* used instead of RWArc in cases where no readers are needed and sightly
279+
* used instead of RWArc in cases where no readers are needed and slightly
280280
* better performance is required.
281281
*
282282
* Both methods have the same failure behaviour as unsafe_access and

src/libextra/getopts.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
//! file name following `-o`, and accepts both `-h` and `--help` as optional flags.
3131
//!
3232
//! ~~~{.rust}
33-
//! exter mod extra;
33+
//! extern mod extra;
3434
//! use extra::getopts::*;
3535
//! use std::os;
3636
//!
@@ -114,7 +114,7 @@ pub enum Occur {
114114
pub struct Opt {
115115
/// Name of the option
116116
name: Name,
117-
/// Wheter it has an argument
117+
/// Whether it has an argument
118118
hasarg: HasArg,
119119
/// How often it can occur
120120
occur: Occur,
@@ -154,7 +154,7 @@ pub enum Fail_ {
154154
UnexpectedArgument(~str),
155155
}
156156

157-
/// The type of failure that occured.
157+
/// The type of failure that occurred.
158158
#[deriving(Eq)]
159159
#[allow(missing_doc)]
160160
pub enum FailType {

src/libextra/tempfile.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ use std::io;
1818
use std::io::fs;
1919

2020
/// A wrapper for a path to temporary directory implementing automatic
21-
/// scope-pased deletion.
21+
/// scope-based deletion.
2222
pub struct TempDir {
2323
priv path: Option<Path>
2424
}

src/libextra/uuid.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ identifiers to entities without requiring a central allocating authority.
1717
1818
They are particularly useful in distributed systems, though can be used in
1919
disparate areas, such as databases and network protocols. Typically a UUID is
20-
displayed in a readable string form as a sequence of hexadecimals digits,
20+
displayed in a readable string form as a sequence of hexadecimal digits,
2121
separated into groups by hyphens.
2222
2323
The uniqueness property is not strictly guaranteed, however for all practical
@@ -89,11 +89,11 @@ pub enum UuidVersion {
8989
/// The reserved variants of UUIDs
9090
#[deriving(Eq)]
9191
pub enum UuidVariant {
92-
/// Reserved by the NCS for backward compatability
92+
/// Reserved by the NCS for backward compatibility
9393
VariantNCS,
9494
/// As described in the RFC4122 Specification (default)
9595
VariantRFC4122,
96-
/// Resreved by Microsoft for backward compatability
96+
/// Reserved by Microsoft for backward compatibility
9797
VariantMicrosoft,
9898
/// Reserved for future expansion
9999
VariantFuture,
@@ -313,7 +313,7 @@ impl Uuid {
313313
str::from_utf8_owned(s)
314314
}
315315

316-
/// Returns a string of hexadecimal digits, separated into groups with a hypen
316+
/// Returns a string of hexadecimal digits, separated into groups with a hyphen.
317317
///
318318
/// Example: `550e8400-e29b-41d4-a716-446655440000`
319319
pub fn to_hyphenated_str(&self) -> ~str {

src/librustuv/idle.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ use std::libc::{c_int, c_void};
1313

1414
use uvll;
1515
use super::{Loop, UvHandle};
16-
use std::rt::rtio::{Callback, PausibleIdleCallback};
16+
use std::rt::rtio::{Callback, PausableIdleCallback};
1717

1818
pub struct IdleWatcher {
1919
handle: *uvll::uv_idle_t,
@@ -63,7 +63,7 @@ impl IdleWatcher {
6363
}
6464
}
6565

66-
impl PausibleIdleCallback for IdleWatcher {
66+
impl PausableIdleCallback for IdleWatcher {
6767
fn pause(&mut self) {
6868
if self.idle_flag == true {
6969
assert_eq!(unsafe {uvll::uv_idle_stop(self.handle) }, 0);
@@ -99,7 +99,7 @@ impl Drop for IdleWatcher {
9999
mod test {
100100
use super::*;
101101
use std::rt::tube::Tube;
102-
use std::rt::rtio::{Callback, PausibleIdleCallback};
102+
use std::rt::rtio::{Callback, PausableIdleCallback};
103103
use super::super::local_loop;
104104

105105
struct MyCallback(Tube<int>, int);

src/librustuv/uvio.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,8 +153,8 @@ impl EventLoop for UvEventLoop {
153153
IdleWatcher::onetime(self.uvio.uv_loop(), f);
154154
}
155155

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

160160
fn remote_callback(&mut self, f: ~Callback) -> ~RemoteCallback {

src/libstd/cell.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ impl<T> RefCell<T> {
8181

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

9999
/// Mutably borrows the wrapped value.
100100
///
101-
/// The borrow lasts untile the returned `RefMut` exits scope. The value
101+
/// The borrow lasts until the returned `RefMut` exits scope. The value
102102
/// cannot be borrowed while this borrow is active.
103103
///
104104
/// # Failure

src/libstd/char.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ fn decompose_hangul(s: char, f: |char|) {
256256
}
257257
}
258258

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

268-
/// Returns the compatibility decompostion of a character
268+
/// Returns the compatibility decomposition of a character.
269269
pub fn decompose_compatible(c: char, f: |char|) {
270270
if (c as uint) < S_BASE || (c as uint) >= (S_BASE + S_COUNT) {
271271
decompose::compatibility(c, f);

src/libstd/clone.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ pub trait Clone {
3333
/// Perform copy-assignment from `source`.
3434
///
3535
/// `a.clone_from(&b)` is equivalent to `a = b.clone()` in functionality,
36-
/// but can be overriden to reuse the resources of `a` to avoid unnecessary
36+
/// but can be overridden to reuse the resources of `a` to avoid unnecessary
3737
/// allocations.
3838
#[inline(always)]
3939
fn clone_from(&mut self, source: &Self) {
@@ -141,7 +141,7 @@ pub trait DeepClone: Clone {
141141
/// Perform deep copy-assignment from `source`.
142142
///
143143
/// `a.deep_clone_from(&b)` is equivalent to `a = b.deep_clone()` in
144-
/// functionality, but can be overriden to reuse the resources of `a` to
144+
/// functionality, but can be overridden to reuse the resources of `a` to
145145
/// avoid unnecessary allocations.
146146
#[inline(always)]
147147
fn deep_clone_from(&mut self, source: &Self) {

src/libstd/condition.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ pub struct Handler<T, U> {
8181
/// the condition (useful for debugging).
8282
///
8383
/// This struct should never be created directly, but rather only through the
84-
/// `condition!` macro provided to all libraries using libstd.
84+
/// `condition!` macro provided to all libraries using `std`.
8585
pub struct Condition<T, U> {
8686
/// Name of the condition handler
8787
name: &'static str,

src/libstd/fmt/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -606,9 +606,9 @@ pub fn writeln(output: &mut io::Writer, args: &Arguments) {
606606
/// See the documentation for `format` for why this function is unsafe and care
607607
/// should be taken if calling it manually.
608608
///
609-
/// Thankfully the rust compiler provides the macro `fmtf!` which will perform
610-
/// all of this validation at compile-time and provides a safe interface for
611-
/// invoking this function.
609+
/// Thankfully the rust compiler provides macros like `write!` and
610+
/// `format_args!` which perform all of this validation at compile-time
611+
/// and provide a safe interface for invoking this function.
612612
///
613613
/// # Arguments
614614
///

src/libstd/io/buffered.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -202,8 +202,8 @@ impl<W: Writer> Decorator<W> for BufferedWriter<W> {
202202
fn inner_mut_ref<'a>(&'a mut self) -> &'a mut W { &mut self.inner }
203203
}
204204

205-
/// Wraps a Writer and buffers output to it, flushing whenever a newline (0xa,
206-
/// '\n') is detected.
205+
/// Wraps a Writer and buffers output to it, flushing whenever a newline (`0x0a`,
206+
/// `'\n'`) is detected.
207207
///
208208
/// Note that this structure does NOT flush the output when dropped.
209209
pub struct LineBufferedWriter<W> {

src/libstd/io/fs.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ pub fn unlink(path: &Path) {
249249
/// directory, etc. This function will traverse symlinks to query
250250
/// information about the destination file.
251251
///
252-
/// Returns a fully-filled out stat structure on succes, and on failure it
252+
/// Returns a fully-filled out stat structure on success, and on failure it
253253
/// will return a dummy stat structure (it is expected that the condition
254254
/// raised is handled as well).
255255
///
@@ -342,7 +342,7 @@ pub fn rename(from: &Path, to: &Path) {
342342
///
343343
/// # Errors
344344
///
345-
/// Will raise an `io_error` condition is the following situtations, but is
345+
/// Will raise an `io_error` condition is the following situations, but is
346346
/// not limited to just these cases:
347347
///
348348
/// * The `from` path is not a file
@@ -391,7 +391,7 @@ pub fn copy(from: &Path, to: &Path) {
391391
///
392392
/// # Errors
393393
///
394-
/// If this funciton encounters an I/O error, it will raise on the `io_error`
394+
/// If this function encounters an I/O error, it will raise on the `io_error`
395395
/// condition. Some possible error situations are not having the permission to
396396
/// change the attributes of a file or the file not existing.
397397
pub fn chmod(path: &Path, mode: io::FilePermission) {
@@ -402,7 +402,7 @@ pub fn chmod(path: &Path, mode: io::FilePermission) {
402402
///
403403
/// # Errors
404404
///
405-
/// This funtion will raise on the `io_error` condition on failure.
405+
/// This function will raise on the `io_error` condition on failure.
406406
pub fn chown(path: &Path, uid: int, gid: int) {
407407
io_raise(|io| io.fs_chown(&path.to_c_str(), uid, gid));
408408
}
@@ -448,7 +448,7 @@ pub fn readlink(path: &Path) -> Option<Path> {
448448
///
449449
/// let p = Path::new("/some/dir");
450450
/// fs::mkdir(&p, S_IRWXU as int);
451-
/// // If we got here, our directory exists! Horray!
451+
/// // If we got here, our directory exists! Hooray!
452452
///
453453
/// # Errors
454454
///
@@ -665,7 +665,7 @@ impl path::Path {
665665
io::result(|| self.stat()).is_ok()
666666
}
667667

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

683-
/// Whether the underlying implemention (be it a file path,
683+
/// Whether the underlying implementation (be it a file path,
684684
/// or something else) is pointing at a directory in the underlying FS.
685685
/// Will return false for paths to non-existent locations or if the item is
686686
/// not a directory (eg files, named pipes, links, etc)

src/libstd/io/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -835,7 +835,7 @@ pub trait Writer {
835835
/// Flush this output stream, ensuring that all intermediately buffered
836836
/// contents reach their destination.
837837
///
838-
/// This is by default a no-op and implementors of the `Writer` trait should
838+
/// This is by default a no-op and implementers of the `Writer` trait should
839839
/// decide whether their stream needs to be buffered or not.
840840
fn flush(&mut self) {}
841841

@@ -1057,7 +1057,7 @@ pub trait Buffer: Reader {
10571057
}
10581058
}
10591059

1060-
/// Reads a sequence of bytes leading up to a specified delimeter. Once the
1060+
/// Reads a sequence of bytes leading up to a specified delimiter. Once the
10611061
/// specified byte is encountered, reading ceases and the bytes up to and
10621062
/// including the delimiter are returned.
10631063
///
@@ -1156,7 +1156,7 @@ pub trait Seek {
11561156
/// A listener is a value that can consume itself to start listening for connections.
11571157
/// Doing so produces some sort of Acceptor.
11581158
pub trait Listener<T, A: Acceptor<T>> {
1159-
/// Spin up the listener and start queueing incoming connections
1159+
/// Spin up the listener and start queuing incoming connections
11601160
///
11611161
/// # Failure
11621162
///

src/libstd/io/native/process.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ impl Process {
5050
/// * prog - the program to run
5151
/// * args - the arguments to pass to the program, not including the program
5252
/// itself
53-
/// * env - an optional envrionment to specify for the child process. If
53+
/// * env - an optional environment to specify for the child process. If
5454
/// this value is `None`, then the child will inherit the parent's
5555
/// environment
5656
/// * cwd - an optionally specified current working directory of the child,

src/libstd/io/signal.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ pub enum Signum {
3434
Break = 21i,
3535
/// Equivalent to SIGHUP, delivered when the user closes the terminal
3636
/// window. On delivery of HangUp, the program is given approximately
37-
/// 10 seconds to perfom any cleanup. After that, Windows will
37+
/// 10 seconds to perform any cleanup. After that, Windows will
3838
/// unconditionally terminate it.
3939
HangUp = 1i,
4040
/// Equivalent to SIGINT, delivered when the user presses Ctrl-c.

src/libstd/iter.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Composable external iterators
1515
# The `Iterator` trait
1616
1717
This module defines Rust's core iteration trait. The `Iterator` trait has one
18-
un-implemented method, `next`. All other methods are derived through default
18+
unimplemented method, `next`. All other methods are derived through default
1919
methods to perform operations such as `zip`, `chain`, `enumerate`, and `fold`.
2020
2121
The goal of this module is to unify iteration across all containers in Rust.
@@ -1688,7 +1688,7 @@ impl<A, T: RandomAccessIterator<A>> RandomAccessIterator<A> for Fuse<T> {
16881688

16891689
impl<T> Fuse<T> {
16901690
/// Resets the fuse such that the next call to .next() or .next_back() will
1691-
/// call the underlying iterator again even if it prevously returned None.
1691+
/// call the underlying iterator again even if it previously returned None.
16921692
#[inline]
16931693
pub fn reset_fuse(&mut self) {
16941694
self.done = false

src/libstd/local_data.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ the TLS slot. Useful for dynamic variables, singletons, and interfacing with
1818
foreign code with bad callback interfaces.
1919
2020
To declare a new key for storing local data of a particular type, use the
21-
`local_data_key!` macro. This macro will expand to a `static` item apppriately
21+
`local_data_key!` macro. This macro will expand to a `static` item appropriately
2222
named and annotated. This name is then passed to the functions in this module to
2323
modify/read the slot specified by the key.
2424

src/libstd/num/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ pub trait Fractional: Num
209209
pub trait Algebraic {
210210
/// Raise a number to a power.
211211
fn pow(&self, n: &Self) -> Self;
212-
/// Take the squre root of a number.
212+
/// Take the square root of a number.
213213
fn sqrt(&self) -> Self;
214214
/// Take the reciprocal (inverse) square root of a number, `1/sqrt(x)`.
215215
fn rsqrt(&self) -> Self;
@@ -229,7 +229,7 @@ pub trait Algebraic {
229229
/// assert_eq!(sixteen, 16.0);
230230
/// ```
231231
#[inline(always)] pub fn pow<T: Algebraic>(value: T, n: T) -> T { value.pow(&n) }
232-
/// Take the squre root of a number.
232+
/// Take the square root of a number.
233233
#[inline(always)] pub fn sqrt<T: Algebraic>(value: T) -> T { value.sqrt() }
234234
/// Take the reciprocal (inverse) square root of a number, `1/sqrt(x)`.
235235
#[inline(always)] pub fn rsqrt<T: Algebraic>(value: T) -> T { value.rsqrt() }

src/libstd/ops.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,7 @@ pub trait BitOr<RHS,Result> {
352352
* # Example
353353
*
354354
* A trivial implementation of `BitXor`. When `Foo ^ Foo` happens, it ends up
355-
* calling `bixtor`, and therefore, `main` prints `Bitwise Xor-ing!`.
355+
* calling `bitxor`, and therefore, `main` prints `Bitwise Xor-ing!`.
356356
*
357357
* ```
358358
* struct Foo;

src/libstd/rand/distributions/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ pub trait Sample<Support> {
4545

4646
/// `Sample`s that do not require keeping track of state.
4747
///
48-
/// Since no state is recored, each sample is (statistically)
48+
/// Since no state is recorded, each sample is (statistically)
4949
/// independent of all others, assuming the `Rng` used has this
5050
/// property.
5151
// XXX maybe having this separate is overkill (the only reason is to
@@ -84,15 +84,15 @@ pub struct Weighted<T> {
8484
/// is to be chosen: higher weight is more likely.
8585
///
8686
/// The `Clone` restriction is a limitation of the `Sample` and
87-
/// `IndepedentSample` traits. Note that `&T` is (cheaply) `Clone` for
87+
/// `IndependentSample` traits. Note that `&T` is (cheaply) `Clone` for
8888
/// all `T`, as is `uint`, so one can store references or indices into
8989
/// another vector.
9090
///
9191
/// # Example
9292
///
9393
/// ```rust
9494
/// use std::rand;
95-
/// use std::rand::distributions::{Weighted, WeightedChoice, IndepedentSample};
95+
/// use std::rand::distributions::{Weighted, WeightedChoice, IndependentSample};
9696
///
9797
/// fn main() {
9898
/// let wc = WeightedChoice::new(~[Weighted { weight: 2, item: 'a' },

src/libstd/rand/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ pub trait Rng {
119119
/// Fill `dest` with random data.
120120
///
121121
/// This has a default implementation in terms of `next_u64` and
122-
/// `next_u32`, but should be overriden by implementations that
122+
/// `next_u32`, but should be overridden by implementations that
123123
/// offer a more efficient solution than just calling those
124124
/// methods repeatedly.
125125
///

0 commit comments

Comments
 (0)