Skip to content

Commit 5553410

Browse files
committed
std: fix spelling in docs.
1 parent 8f6df87 commit 5553410

File tree

20 files changed

+51
-50
lines changed

20 files changed

+51
-50
lines changed

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.

0 commit comments

Comments
 (0)