From d02e79ceb133147c26095ebb4a6c7cdc5568deec Mon Sep 17 00:00:00 2001 From: "Carol (Nichols || Goulding)" Date: Wed, 12 Apr 2017 18:47:58 -0400 Subject: [PATCH] spellingz --- second-edition/dictionary.txt | 5 +++++ second-edition/src/ch19-03-advanced-traits.md | 2 +- second-edition/src/ch19-04-advanced-types.md | 8 ++++---- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/second-edition/dictionary.txt b/second-edition/dictionary.txt index b86dff4c9..a0a90473f 100644 --- a/second-edition/dictionary.txt +++ b/second-edition/dictionary.txt @@ -44,6 +44,7 @@ ChangeColor ChangeColorMessage chXX chYY +ConcreteType config Config const @@ -193,6 +194,7 @@ namespacing newfound NewsArticle newtype +newtypes nitty nocapture nomicon @@ -208,6 +210,7 @@ OptionalNumber OsStr OsString other's +OutlinePrint overread parameterize ParseIntError @@ -215,6 +218,7 @@ PartialEq PartialOrd PendingReview PendingReviewPost +PlaceholderType portia powi preprocessing @@ -295,6 +299,7 @@ Supertraits test's TextField That'd +there'd threadsafe timestamp Tiếng diff --git a/second-edition/src/ch19-03-advanced-traits.md b/second-edition/src/ch19-03-advanced-traits.md index 5b32f5070..7ed4f12c3 100644 --- a/second-edition/src/ch19-03-advanced-traits.md +++ b/second-edition/src/ch19-03-advanced-traits.md @@ -354,7 +354,7 @@ fn main() { Listing 19-27: Implementing two traits that both have a method with the same name as a method defined on the struct directly -For the implemetation of the `f` method for the `Foo` trait on `Baz`, we're +For the implementation of the `f` method for the `Foo` trait on `Baz`, we're printing out `Baz's impl of Foo`. For the implementation of the `f` method for the `Bar` trait on `Baz`, we're printing out `Baz's impl of Bar`. The implementation of `f` directly on `Baz` prints out `Baz's impl`. What should diff --git a/second-edition/src/ch19-04-advanced-types.md b/second-edition/src/ch19-04-advanced-types.md index 51376a8c8..eea5e1fd9 100644 --- a/second-edition/src/ch19-04-advanced-types.md +++ b/second-edition/src/ch19-04-advanced-types.md @@ -282,9 +282,9 @@ said this about `&str`: > ... it’s a reference to an internal position in the String and the number of > elements that it refers to. -So while a `&T` is a single value that stors the memory address of where the `T` -is located, a `&str` is *two* values: the address of the `str` and how long it -is. As such, a `&str` has a size we can know at compile time: it's two times +So while a `&T` is a single value that stores the memory address of where the +`T` is located, a `&str` is *two* values: the address of the `str` and how long +it is. As such, a `&str` has a size we can know at compile time: it's two times the size of a `usize` in length. That is, we always know the size of a `&str`, no matter how long the string it refers to is. This is the general way in which dynamically sized types are used in Rust; they have an extra bit of metadata @@ -309,7 +309,7 @@ To work with DSTs, Rust has a trait that determines if a type's size is known at compile time or not, which is `Sized`. This trait is automatically implemented for everything the compiler knows the size of at compile time. In addition, Rust implicitly adds a bound on `Sized` to every generic function. -That is, a generic function definitition like this: +That is, a generic function definition like this: ```rust,ignore fn generic(t: T) {