Skip to content

Commit e688d0e

Browse files
committed
auto merge of #14751 : jbcrail/rust/fix-comments, r=alexcrichton
2 parents 8dcbdaa + 45e56ec commit e688d0e

File tree

12 files changed

+17
-17
lines changed

12 files changed

+17
-17
lines changed

src/libcollections/vec.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1532,7 +1532,7 @@ impl<T> FromVec<T> for ~[T] {
15321532

15331533
// In a post-DST world, we can attempt to reuse the Vec allocation by calling
15341534
// shrink_to_fit() on it. That may involve a reallocation+memcpy, but that's no
1535-
// diffrent than what we're doing manually here.
1535+
// different than what we're doing manually here.
15361536

15371537
let vp = v.as_mut_ptr();
15381538

src/libcore/simd.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
//!
3232
//! ## Stability Note
3333
//!
34-
//! These are all experimental. The inferface may change entirely, without
34+
//! These are all experimental. The interface may change entirely, without
3535
//! warning.
3636
3737
#![allow(non_camel_case_types)]

src/libcore/str.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -478,7 +478,7 @@ impl TwoWaySearcher {
478478
}
479479

480480
/// The internal state of an iterator that searches for matches of a substring
481-
/// within a larger string using a dynamically chosed search algorithm
481+
/// within a larger string using a dynamically chosen search algorithm
482482
#[deriving(Clone)]
483483
enum Searcher {
484484
Naive(NaiveSearcher),
@@ -1120,7 +1120,7 @@ pub trait StrSlice<'a> {
11201120
///
11211121
/// That is, each returned value `(start, end)` satisfies
11221122
/// `self.slice(start, end) == sep`. For matches of `sep` within
1123-
/// `self` that overlap, only the indicies corresponding to the
1123+
/// `self` that overlap, only the indices corresponding to the
11241124
/// first match are returned.
11251125
///
11261126
/// # Example

src/libserialize/json.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -992,7 +992,7 @@ enum ParserState {
992992
ParseObject(bool),
993993
// Parse ',' or ']' after an element in an object.
994994
ParseObjectComma,
995-
// Initialial state.
995+
// Initial state.
996996
ParseStart,
997997
// Expecting the stream to end.
998998
ParseBeforeFinish,
@@ -1152,7 +1152,7 @@ pub struct Parser<T> {
11521152
// We maintain a stack representing where we are in the logical structure
11531153
// of the JSON stream.
11541154
stack: Stack,
1155-
// A state machine is kept to make it possible to interupt and resume parsing.
1155+
// A state machine is kept to make it possible to interrupt and resume parsing.
11561156
state: ParserState,
11571157
}
11581158

@@ -1449,7 +1449,7 @@ impl<T: Iterator<char>> Parser<T> {
14491449
// information to return a JsonEvent.
14501450
// Manages an internal state so that parsing can be interrupted and resumed.
14511451
// Also keeps track of the position in the logical structure of the json
1452-
// stream int the form of a stack that can be queried by the user usng the
1452+
// stream int the form of a stack that can be queried by the user using the
14531453
// stack() method.
14541454
fn parse(&mut self) -> JsonEvent {
14551455
loop {

src/libstd/io/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -910,7 +910,7 @@ impl<'a> Reader for &'a mut Reader {
910910

911911
/// Returns a slice of `v` between `start` and `end`.
912912
///
913-
/// Similar to `slice()` except this function only bounds the sclie on the
913+
/// Similar to `slice()` except this function only bounds the slice on the
914914
/// capacity of `v`, not the length.
915915
///
916916
/// # Failure

src/libstd/io/process.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -873,7 +873,7 @@ mod tests {
873873
pub fn sleeper() -> Process {
874874
// There's a `timeout` command on windows, but it doesn't like having
875875
// its output piped, so instead just ping ourselves a few times with
876-
// gaps inbetweeen so we're sure this process is alive for awhile
876+
// gaps in between so we're sure this process is alive for awhile
877877
Command::new("ping").arg("127.0.0.1").arg("-n").arg("1000").spawn().unwrap()
878878
}
879879

src/libstd/io/stdio.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ local_data_key!(local_stdout: Box<Writer:Send>)
102102
pub fn stdin() -> BufferedReader<StdReader> {
103103
// The default buffer capacity is 64k, but apparently windows doesn't like
104104
// 64k reads on stdin. See #13304 for details, but the idea is that on
105-
// windows we use a slighly smaller buffer that's been seen to be
105+
// windows we use a slightly smaller buffer that's been seen to be
106106
// acceptable.
107107
if cfg!(windows) {
108108
BufferedReader::with_capacity(8 * 1024, stdin_raw())

src/libstd/io/timer.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ mod test {
218218
iotest!(fn test_io_timer_oneshot_then_sleep() {
219219
let mut timer = Timer::new().unwrap();
220220
let rx = timer.oneshot(100000000000);
221-
timer.sleep(1); // this should inalidate rx
221+
timer.sleep(1); // this should invalidate rx
222222

223223
assert_eq!(rx.recv_opt(), Err(()));
224224
})
@@ -352,7 +352,7 @@ mod test {
352352
let mut timer1 = Timer::new().unwrap();
353353
timer1.oneshot(1);
354354
let mut timer2 = Timer::new().unwrap();
355-
// while sleeping, the prevous timer should fire and not have its
355+
// while sleeping, the previous timer should fire and not have its
356356
// callback do something terrible.
357357
timer2.sleep(2);
358358
})
@@ -361,7 +361,7 @@ mod test {
361361
let mut timer1 = Timer::new().unwrap();
362362
timer1.periodic(1);
363363
let mut timer2 = Timer::new().unwrap();
364-
// while sleeping, the prevous timer should fire and not have its
364+
// while sleeping, the previous timer should fire and not have its
365365
// callback do something terrible.
366366
timer2.sleep(2);
367367
})

src/libstd/num/strconv.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -636,7 +636,7 @@ pub fn from_str_bytes_common<T:NumCast+Zero+One+PartialEq+PartialOrd+Div<T,T>+
636636
if accum_positive && accum <= last_accum { return NumStrConv::inf(); }
637637
if !accum_positive && accum >= last_accum { return NumStrConv::neg_inf(); }
638638

639-
// Detect overflow by reversing the shift-and-add proccess
639+
// Detect overflow by reversing the shift-and-add process
640640
if accum_positive &&
641641
(last_accum != ((accum - cast(digit as int).unwrap())/radix_gen.clone())) {
642642
return NumStrConv::inf();

src/libstd/os.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,7 @@ pub fn env_as_bytes() -> Vec<(Vec<u8>,Vec<u8>)> {
320320
/// let key = "HOME";
321321
/// match std::os::getenv(key) {
322322
/// Some(val) => println!("{}: {}", key, val),
323-
/// None => println!("{} is not defined in the environnement.", key)
323+
/// None => println!("{} is not defined in the environment.", key)
324324
/// }
325325
/// ```
326326
pub fn getenv(n: &str) -> Option<String> {

src/libstd/path/windows.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ impl GenericPathUnsafe for Path {
186186
ret
187187
}
188188

189-
/// See `GenericPathUnsafe::set_filename_unchecekd`.
189+
/// See `GenericPathUnsafe::set_filename_unchecked`.
190190
///
191191
/// # Failure
192192
///

src/libstd/rt/thread.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ mod imp {
243243
// EINVAL means |stack_size| is either too small or not a
244244
// multiple of the system page size. Because it's definitely
245245
// >= PTHREAD_STACK_MIN, it must be an alignment issue.
246-
// Round up to the neareast page and try again.
246+
// Round up to the nearest page and try again.
247247
let page_size = os::page_size();
248248
let stack_size = (stack_size + page_size - 1) & (-(page_size - 1) - 1);
249249
assert_eq!(pthread_attr_setstacksize(&mut attr, stack_size as libc::size_t), 0);

0 commit comments

Comments
 (0)