spellingz

This commit is contained in:
Carol (Nichols || Goulding)
2017-04-12 18:47:58 -04:00
parent 27ceeb2dab
commit d02e79ceb1
3 changed files with 10 additions and 5 deletions

View File

@@ -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

View File

@@ -354,7 +354,7 @@ fn main() {
<span class="caption">Listing 19-27: Implementing two traits that both have a
method with the same name as a method defined on the struct directly</span>
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

View File

@@ -282,9 +282,9 @@ said this about `&str`:
> ... its 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: T) {