1
0
mirror of https://github.com/google/comprehensive-rust.git synced 2025-05-16 07:36:05 +02:00

Correct minor typos in slide notes (#2687)

- There's a `NotCloneable` in the code, no `NonCloneable`
- Point<StderrLogger> doesn't make sense in this context
This commit is contained in:
Colin Pitrat 2025-03-04 12:50:45 +00:00 committed by GitHub
parent 7f45460811
commit b24914a247
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 7 additions and 7 deletions

View File

@ -2,7 +2,7 @@
minutes: 10
---
# Closures
# Closure traits
Closures or lambda expressions have types which cannot be named. However, they
implement special [`Fn`](https://doc.rust-lang.org/std/ops/trait.Fn.html),

View File

@ -52,7 +52,7 @@ fn main() {
- It is possible to write `impl VerbosityFilter<StderrLogger> { .. }`.
- `VerbosityFilter` is still generic and you can use `VerbosityFilter<f64>`,
but methods in this block will only be available for
`Point<StderrLogger>`.
`VerbosityFilter<StderrLogger>`.
- Note that we don't put a trait bound on the `VerbosityFilter` type itself. You
can put bounds there as well, but generally in Rust we only put the trait
bounds on the impl blocks.

View File

@ -25,7 +25,7 @@ fn main() {
<details>
- Try making a `NonCloneable` and passing it to `duplicate`.
- Try making a `NotCloneable` and passing it to `duplicate`.
- When multiple traits are necessary, use `+` to join them.

View File

@ -72,10 +72,10 @@ impl PartialOrd for Citation {
- In practice, it's common to derive these traits, but uncommon to implement
them.
- When comparing references in Rust, it will will compare the value of the
things pointed to, it will NOT compare the references themselves. That means
that references to two different things can compare as equal if the values
pointed to are the same:
- When comparing references in Rust, it will compare the value of the things
pointed to, it will NOT compare the references themselves. That means that
references to two different things can compare as equal if the values pointed
to are the same:
```rust,editable
fn main() {