diff options
| author | Huon Wilson <dbau.pp+github@gmail.com> | 2014-02-17 22:53:45 +1100 |
|---|---|---|
| committer | Huon Wilson <dbau.pp+github@gmail.com> | 2014-02-18 08:05:35 +1100 |
| commit | 6555b04dd2fbcd18c8fa8beb2bebc4b81febc6b0 (patch) | |
| tree | 67b79727570ea14a3b0520b5562aa9e1fba154f9 /src/libextra | |
| parent | c8489069b43191c5298f17430933b3b88fb79c3c (diff) | |
| download | rust-6555b04dd2fbcd18c8fa8beb2bebc4b81febc6b0.tar.gz rust-6555b04dd2fbcd18c8fa8beb2bebc4b81febc6b0.zip | |
Spellcheck library docs.
Diffstat (limited to 'src/libextra')
| -rw-r--r-- | src/libextra/json.rs | 10 | ||||
| -rw-r--r-- | src/libextra/test.rs | 2 |
2 files changed, 6 insertions, 6 deletions
diff --git a/src/libextra/json.rs b/src/libextra/json.rs index 4c6cd4218e7..edf5bb63b30 100644 --- a/src/libextra/json.rs +++ b/src/libextra/json.rs @@ -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 @@ impl ToJson for TestStruct1 { } 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 diff --git a/src/libextra/test.rs b/src/libextra/test.rs index 07327227d85..3ee2cf6371a 100644 --- a/src/libextra/test.rs +++ b/src/libextra/test.rs @@ -1111,7 +1111,7 @@ impl MetricMap { // 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. /// |
