mirror of
https://github.com/google/comprehensive-rust.git
synced 2024-11-28 10:03:09 +02:00
Fix typos (#1608)
This commit is contained in:
parent
cf81b7a88d
commit
30f8e50b43
@ -39,7 +39,7 @@ used:
|
||||
|
||||
* QR has very little functionality in the first-party Rust layer (it's just a
|
||||
thin FFI glue) and therefore uses the existing C++ unit tests for testing
|
||||
both the C++ and the Rust implementation (parametrizing the tests so they
|
||||
both the C++ and the Rust implementation (parameterizing the tests so they
|
||||
enable or disable Rust using a `ScopedFeatureList`).
|
||||
|
||||
* Hypothetical/WIP PNG integration may need to implement memory-safe
|
||||
|
@ -24,6 +24,6 @@ few handy features:
|
||||
As students head into the break, encourage them to open up the playground and
|
||||
experiment a little. Encourage them to keep the tab open and try things out
|
||||
during the rest of the course. This is particularly helpful for advanced
|
||||
students who want to know more about Rust's optimzations or generated assembly.
|
||||
students who want to know more about Rust's optimizations or generated assembly.
|
||||
|
||||
</details>
|
||||
|
@ -36,7 +36,7 @@ Discussion points:
|
||||
call site.
|
||||
* Why is `Output` an associated type? Could it be made a type parameter of the method?
|
||||
* Short answer: Function type parameters are controlled by the caller, but
|
||||
associated types (like `Output`) are controlled by the implementor of a
|
||||
associated types (like `Output`) are controlled by the implementer of a
|
||||
trait.
|
||||
* You could implement `Add` for two different types, e.g.
|
||||
`impl Add<(i32, i32)> for Point` would add a tuple to a `Point`.
|
||||
|
@ -51,7 +51,7 @@ In the case of pointer dereferences, this means that the pointers must be
|
||||
|
||||
In most cases the pointer must also be properly aligned.
|
||||
|
||||
The "NOT SAFE" sectoin gives an example of a common kind of UB bug: `*r1` has
|
||||
The "NOT SAFE" section gives an example of a common kind of UB bug: `*r1` has
|
||||
the `'static` lifetime, so `r3` has type `&'static String`, and thus outlives
|
||||
`s`. Creating a reference from a pointer requires _great care_.
|
||||
|
||||
|
@ -206,7 +206,7 @@
|
||||
}
|
||||
break;
|
||||
case "speakerNotes":
|
||||
// When nagigating to another page, we see two state changes in rapid
|
||||
// When navigating to another page, we see two state changes in rapid
|
||||
// succession:
|
||||
//
|
||||
// - "popup" -> "inline-open"
|
||||
|
Loading…
Reference in New Issue
Block a user