]> git.lizzy.rs Git - rust.git/commitdiff
auto merge of #12345 : huonw/rust/speeling, r=cmr
authorbors <bors@rust-lang.org>
Tue, 18 Feb 2014 10:51:49 +0000 (02:51 -0800)
committerbors <bors@rust-lang.org>
Tue, 18 Feb 2014 10:51:49 +0000 (02:51 -0800)
src/libextra/json.rs
src/libextra/test.rs
src/libgreen/sched.rs
src/libstd/comm/select.rs
src/libstd/io/mod.rs
src/libstd/iter.rs
src/libstd/rt/task.rs
src/libstd/rt/unwind.rs
src/libstd/sync/mpsc_queue.rs
src/libsync/sync/mutex.rs

index 4c6cd4218e7ae9b49fd12da9749dbb0bf2e0c52b..edf5bb63b300421eebb3f153beaaba0555d6ef48 100644 (file)
@@ -125,7 +125,7 @@ fn main() {
 }
 ```
 
-To decode a json string using `Decodable` trait :
+To decode a JSON string using `Decodable` trait :
 
 ```rust
 extern crate serialize;
@@ -172,7 +172,7 @@ fn main() {
          {data_int: 1, data_str:~"toto", data_vector:~[2,3,4,5]};
     let encoded_str: ~str = json::Encoder::str_encode(&to_encode_object);
 
-    // To unserialize use the `extra::json::from_str` and `extra::json::Decoder`
+    // To deserialize use the `extra::json::from_str` and `extra::json::Decoder`
 
     let json_object = extra::json::from_str(encoded_str);
     let mut decoder = json::Decoder::new(json_object.unwrap());
@@ -182,7 +182,7 @@ fn main() {
 
 ## Using `ToJson`
 
-This example use the ToJson impl to unserialize the json string.
+This example use the ToJson impl to deserialize the JSON string.
 Example of `ToJson` trait implementation for TestStruct1.
 
 ```rust
@@ -212,13 +212,13 @@ fn to_json( &self ) -> json::Json {
 }
 
 fn main() {
-    // Seralization using our impl of to_json
+    // Serialization using our impl of to_json
 
     let test2: TestStruct1 = TestStruct1 {data_int: 1, data_str:~"toto", data_vector:~[2,3,4,5]};
     let tjson: json::Json = test2.to_json();
     let json_str: ~str = tjson.to_str();
 
-    // Unserialize like before.
+    // Deserialize like before.
 
     let mut decoder = json::Decoder::new(json::from_str(json_str).unwrap());
     // create the final object
index 8d85dc9b6ff2465d25d9f9da2e584b4874723789..fe397c30ab581f5921d3bf36af0a45ccf1edf050 100644 (file)
@@ -1110,7 +1110,7 @@ pub fn ratchet(&self, p: &Path, pct: Option<f64>) -> (MetricDiff, bool) {
 
 // Benchmarking
 
-/// A function that is opaque to the optimiser, to allow benchmarks to
+/// A function that is opaque to the optimizer, to allow benchmarks to
 /// pretend to use outputs to assist in avoiding dead-code
 /// elimination.
 ///
index ad32ba7ba6d1c8ff5dda82bef37ab754a4da3d7b..a966dff000ae0b2a3ae6047652ed012550a55e56 100644 (file)
@@ -86,7 +86,7 @@ pub struct Scheduler {
     /// A flag to tell the scheduler loop it needs to do some stealing
     /// in order to introduce randomness as part of a yield
     steal_for_yield: bool,
-    /// Bookeeping for the number of tasks which are currently running around
+    /// Bookkeeping for the number of tasks which are currently running around
     /// inside this pool of schedulers
     task_state: TaskState,
 
index e41fa60aa42e6c4c79d02ae8fa9329c37cf6e857..02066086ad7735d316c6d69b48fccd4198bcf932 100644 (file)
@@ -144,7 +144,7 @@ pub fn handle<'a, T: Send>(&'a self, port: &'a Port<T>) -> Handle<'a, T> {
         }
     }
 
-    /// Waits for an event on this port set. The returned valus is *not* and
+    /// Waits for an event on this port set. The returned value is *not* an
     /// index, but rather an id. This id can be queried against any active
     /// `Handle` structures (each one has an `id` method). The handle with
     /// the matching `id` will have some sort of event available on it. The
index c99fe587fc0d0b5b9e7e43fa8cdc40727023bc06..2eadf9a7f4fc69de81b22b493a5f39aba1fdc44a 100644 (file)
@@ -1287,7 +1287,7 @@ fn incoming<'r>(&'r mut self) -> IncomingConnections<'r, Self> {
 ///
 /// Since connection attempts can continue forever, this iterator always returns
 /// `Some`. The `Some` contains the `IoResult` representing whether the
-/// connection attempt was succesful.  A successful connection will be wrapped
+/// connection attempt was successful.  A successful connection will be wrapped
 /// in `Ok`. A failed connection is represented as an `Err`.
 pub struct IncomingConnections<'a, A> {
     priv inc: &'a mut A,
index e5a89fc42e1521227a2029373d607ffdcafae7ef..7516a3ddf543eb1a802e3d5f10d7e603aff647a6 100644 (file)
@@ -883,7 +883,7 @@ pub trait OrdIterator<A> {
     /// ```
     fn min(&mut self) -> Option<A>;
 
-    /// `min_max` finds the mininum and maximum elements in the iterator.
+    /// `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.
index 0719523af775fd3058b1c5a82c3b9bcf8dbd4220..72ba98eab4f7dacdacd3c7e6e1480ed62e68f5bb 100644 (file)
@@ -254,7 +254,7 @@ pub fn deschedule(mut ~self, amt: uint,
         ops.deschedule(amt, self, f)
     }
 
-    /// Wakes up a previously blocked task, optionally specifiying whether the
+    /// Wakes up a previously blocked task, optionally specifying whether the
     /// current task can accept a change in scheduling. This function can only
     /// be called on tasks that were previously blocked in `deschedule`.
     pub fn reawaken(mut ~self) {
index 5718a27bfef2de8b709fe082a06fc928c5ffa0d8..ef8bd94c89766f1883ff51eb4bbfc2502eb2f652 100644 (file)
@@ -400,7 +400,7 @@ fn static_char_ptr(p: *u8) -> &'static str {
 /// The entry point for unwinding with a formatted message.
 ///
 /// This is designed to reduce the amount of code required at the call
-/// site as much as possible (so that `fail!()` has as low an implact
+/// site as much as possible (so that `fail!()` has as low an impact
 /// on (e.g.) the inlining of other functions as possible), by moving
 /// the actual formatting into this shared place.
 #[inline(never)] #[cold]
index b5a55f3f8c973c930acd682436ecf0ae9ffdc52f..2dc63380cb8902c39712cf3307024b21f56fd7f3 100644 (file)
@@ -104,7 +104,7 @@ pub fn push(&mut self, t: T) {
     ///
     /// Note that the current implementation means that this function cannot
     /// return `Option<T>`. It is possible for this queue to be in an
-    /// inconsistent state where many pushes have suceeded and completely
+    /// inconsistent state where many pushes have succeeded and completely
     /// finished, but pops cannot return `Some(t)`. This inconsistent state
     /// happens when a pusher is pre-empted at an inopportune moment.
     ///
@@ -203,4 +203,3 @@ fn test() {
         }
     }
 }
-
index 9ca2f1fd7ffe32430756d4ea8bac5b8b0a9f39ed..923f12ed1d19aac4db99fd1eb296469782a0e548 100644 (file)
@@ -460,7 +460,7 @@ pub fn try_lock<'a>(&'a mut self) -> Option<Guard<'a>> {
 
     /// Acquires a mutex, blocking the current task until it is able to do so.
     ///
-    /// This function will block the local task until it is availble to acquire
+    /// This function will block the local task until it is available to acquire
     /// the mutex. Upon returning, the task is the only task with the mutex
     /// held. An RAII guard is returned to allow scoped unlock of the lock. When
     /// the guard goes out of scope, the mutex will be unlocked.