diff options
| author | Huon Wilson <dbau.pp+github@gmail.com> | 2014-05-22 22:50:31 +1000 |
|---|---|---|
| committer | Huon Wilson <dbau.pp+github@gmail.com> | 2014-05-22 22:55:37 +1000 |
| commit | 37bd466e5898da17f474628461abdd023c4d6a4d (patch) | |
| tree | 11d21ca8cf5667aa3d6bb18c11333f200e95e90c /src/libcore | |
| parent | e7e5e9ce962d8243edd418c6f6d549d5bb62a227 (diff) | |
| download | rust-37bd466e5898da17f474628461abdd023c4d6a4d.tar.gz rust-37bd466e5898da17f474628461abdd023c4d6a4d.zip | |
Spelling/doc formatting fixes.
Diffstat (limited to 'src/libcore')
| -rw-r--r-- | src/libcore/cell.rs | 4 | ||||
| -rw-r--r-- | src/libcore/fmt/mod.rs | 2 | ||||
| -rw-r--r-- | src/libcore/iter.rs | 6 | ||||
| -rw-r--r-- | src/libcore/kinds.rs | 2 | ||||
| -rw-r--r-- | src/libcore/result.rs | 2 |
5 files changed, 9 insertions, 7 deletions
diff --git a/src/libcore/cell.rs b/src/libcore/cell.rs index 093b3f57047..60c9020f14e 100644 --- a/src/libcore/cell.rs +++ b/src/libcore/cell.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -//! Sharable mutable containers. +//! Shareable mutable containers. //! //! Values of the `Cell` and `RefCell` types may be mutated through //! shared references (i.e. the common `&T` type), whereas most Rust @@ -41,7 +41,7 @@ //! preventing crash bugs. Because of that, inherited mutability is //! preferred, and interior mutability is something of a last //! resort. Since cell types enable mutation where it would otherwise -//! be disallowed though, there are occassions when interior +//! be disallowed though, there are occasions when interior //! mutability might be appropriate, or even *must* be used, e.g. //! //! * Introducing inherited mutability roots to shared types. diff --git a/src/libcore/fmt/mod.rs b/src/libcore/fmt/mod.rs index af492dc295a..ae6962d76fa 100644 --- a/src/libcore/fmt/mod.rs +++ b/src/libcore/fmt/mod.rs @@ -76,7 +76,7 @@ pub trait FormatWriter { /// This function will return an instance of `FormatError` on error. fn write(&mut self, bytes: &[u8]) -> Result; - /// Glue for usage of the `write!` macro with implementors of this trait. + /// Glue for usage of the `write!` macro with implementers of this trait. /// /// This method should generally not be invoked manually, but rather through /// the `write!` macro itself. diff --git a/src/libcore/iter.rs b/src/libcore/iter.rs index da1462a7047..eea9c9c0812 100644 --- a/src/libcore/iter.rs +++ b/src/libcore/iter.rs @@ -872,10 +872,12 @@ pub trait OrdIterator<A> { /// `min_max` finds the minimum and maximum elements in the iterator. /// /// The return type `MinMaxResult` is an enum of three variants: + /// /// - `NoElements` if the iterator is empty. /// - `OneElement(x)` if the iterator has exactly one element. - /// - `MinMax(x, y)` is returned otherwise, where `x <= y`. Two values are equal if and only if - /// there is more than one element in the iterator and all elements are equal. + /// - `MinMax(x, y)` is returned otherwise, where `x <= y`. Two + /// values are equal if and only if there is more than one + /// element in the iterator and all elements are equal. /// /// On an iterator of length `n`, `min_max` does `1.5 * n` comparisons, /// and so faster than calling `min` and `max separately which does `2 * n` comparisons. diff --git a/src/libcore/kinds.rs b/src/libcore/kinds.rs index 148b63dfbfe..770aa7547ff 100644 --- a/src/libcore/kinds.rs +++ b/src/libcore/kinds.rs @@ -266,7 +266,7 @@ pub mod marker { #[deriving(Eq,Clone)] pub struct NoCopy; - /// A type which is considered "not sharable", meaning that + /// A type which is considered "not shareable", meaning that /// its contents are not threadsafe, hence they cannot be /// shared between tasks. #[lang="no_share_bound"] diff --git a/src/libcore/result.rs b/src/libcore/result.rs index 46f4427e838..5a3599e4827 100644 --- a/src/libcore/result.rs +++ b/src/libcore/result.rs @@ -252,7 +252,7 @@ //! The suitability of `fail!` as an error handling mechanism is //! limited by Rust's lack of any way to "catch" and resume execution //! from a thrown exception. Therefore using failure for error -//! handling requires encapsulating fallable code in a task. Calling +//! handling requires encapsulating fallible code in a task. Calling //! the `fail!` macro, or invoking `fail!` indirectly should be //! avoided as an error reporting strategy. Failure is only for //! unrecoverable errors and a failing task is typically the sign of |
