diff options
| author | bors <bors@rust-lang.org> | 2015-10-08 22:40:50 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2015-10-08 22:40:50 +0000 |
| commit | d0cae14f6627e2ad2b50998755eeb818aad750ca (patch) | |
| tree | 37db2fd58d85f39c7154c96f6dffc4b2f341dfe5 /src/libstd/sys | |
| parent | 11eda66df859f53754788044476af753a012332f (diff) | |
| parent | 4b308b44e1d8204702f6912dda4dfc404aa2a87d (diff) | |
| download | rust-d0cae14f6627e2ad2b50998755eeb818aad750ca.tar.gz rust-d0cae14f6627e2ad2b50998755eeb818aad750ca.zip | |
Auto merge of #28900 - cristicbz:typos, r=alexcrichton
I found these automatically, but fixed them manually to ensure the semantics are correct. I know things like these are hardly important, since they only marginally improve clarity. But at least for me typos and simple grammatical errors trigger an---unjustified---sense of unprofessionalism, despite the fact that I make them all the time and I understand that they're the sort of thing that is bound to slip through review.
Anyway, to find most of these I used:
* `ag '.*//.*(\b[A-Za-z]{2,}\b) \1\b'` for repeated words
* `ag '\b(the|this|those|these|a|it) (a|the|this|those|these|it)\b'` to find constructs like 'the this' etc. many false positives, but not too hard to scroll through them to actually find the mistakes.
* `cat ../../typos.txt | paste -d'|' - - - - - - - - - - - - - - - - - - - - - - | tr '\n' '\0' | xargs -0 -P4 -n1 ag`. Hacky way to find misspellings, but it works ok. I got `typos.txt` from [Wikipedia](https://en.wikipedia.org/wiki/Wikipedia:Lists_of_common_misspellings/For_machines)
* `ag '.*//.* a ([ae][a-z]|(o[^n])|(i[a-rt-z]))'` to find places where 'a' was followed by a vowel (requiring 'an' instead).
I also used a handful more one off regexes that are too boring to reproduce here.
Diffstat (limited to 'src/libstd/sys')
| -rw-r--r-- | src/libstd/sys/common/wtf8.rs | 4 | ||||
| -rw-r--r-- | src/libstd/sys/unix/ext/process.rs | 2 | ||||
| -rw-r--r-- | src/libstd/sys/unix/mod.rs | 2 | ||||
| -rw-r--r-- | src/libstd/sys/windows/mod.rs | 4 | ||||
| -rw-r--r-- | src/libstd/sys/windows/mutex.rs | 2 |
5 files changed, 7 insertions, 7 deletions
diff --git a/src/libstd/sys/common/wtf8.rs b/src/libstd/sys/common/wtf8.rs index 10f77d0207c..a6eada832cd 100644 --- a/src/libstd/sys/common/wtf8.rs +++ b/src/libstd/sys/common/wtf8.rs @@ -146,13 +146,13 @@ impl fmt::Debug for Wtf8Buf { } impl Wtf8Buf { - /// Creates an new, empty WTF-8 string. + /// Creates a new, empty WTF-8 string. #[inline] pub fn new() -> Wtf8Buf { Wtf8Buf { bytes: Vec::new() } } - /// Creates an new, empty WTF-8 string with pre-allocated capacity for `n` bytes. + /// Creates a new, empty WTF-8 string with pre-allocated capacity for `n` bytes. #[inline] pub fn with_capacity(n: usize) -> Wtf8Buf { Wtf8Buf { bytes: Vec::with_capacity(n) } diff --git a/src/libstd/sys/unix/ext/process.rs b/src/libstd/sys/unix/ext/process.rs index 81980ea25fb..dcfa376c81e 100644 --- a/src/libstd/sys/unix/ext/process.rs +++ b/src/libstd/sys/unix/ext/process.rs @@ -39,7 +39,7 @@ pub trait CommandExt { /// This is not enough to create a daemon process. The *init* process should /// be the child reaper of a daemon. This can be achieved if the parent /// process exit. Moreover, a daemon should not have a controlling terminal. - /// To acheive this, a session leader (the child) must spawn another process + /// To achieve this, a session leader (the child) must spawn another process /// (the daemon) in the same session. #[unstable(feature = "process_session_leader", reason = "recently added", issue = "27811")] diff --git a/src/libstd/sys/unix/mod.rs b/src/libstd/sys/unix/mod.rs index 964bc08ff4e..3a88f36399e 100644 --- a/src/libstd/sys/unix/mod.rs +++ b/src/libstd/sys/unix/mod.rs @@ -49,7 +49,7 @@ pub mod time; pub mod stdio; pub fn init() { - // By default, some platforms will send a *signal* when a EPIPE error + // By default, some platforms will send a *signal* when an EPIPE error // would otherwise be delivered. This runtime doesn't install a SIGPIPE // handler, causing it to kill the program, which isn't exactly what we // want! diff --git a/src/libstd/sys/windows/mod.rs b/src/libstd/sys/windows/mod.rs index 04bb5e5ea38..85f5d4e5884 100644 --- a/src/libstd/sys/windows/mod.rs +++ b/src/libstd/sys/windows/mod.rs @@ -75,8 +75,8 @@ fn to_utf16_os(s: &OsStr) -> Vec<u16> { v } -// Many Windows APIs follow a pattern of where we hand the a buffer and then -// they will report back to us how large the buffer should be or how many bytes +// Many Windows APIs follow a pattern of where we hand a buffer and then they +// will report back to us how large the buffer should be or how many bytes // currently reside in the buffer. This function is an abstraction over these // functions by making them easier to call. // diff --git a/src/libstd/sys/windows/mutex.rs b/src/libstd/sys/windows/mutex.rs index 277c3d14c0e..b770156582d 100644 --- a/src/libstd/sys/windows/mutex.rs +++ b/src/libstd/sys/windows/mutex.rs @@ -22,7 +22,7 @@ //! more details. //! //! 3. While CriticalSection is fair and SRWLock is not, the current Rust policy -//! is there there are no guarantees of fairness. +//! is that there are no guarantees of fairness. //! //! The downside of this approach, however, is that SRWLock is not available on //! Windows XP, so we continue to have a fallback implementation where |
