From b24914a24795f24620ff87c65fcaf280ce8ea748 Mon Sep 17 00:00:00 2001 From: Colin Pitrat Date: Tue, 4 Mar 2025 12:50:45 +0000 Subject: [PATCH] Correct minor typos in slide notes (#2687) - There's a `NotCloneable` in the code, no `NonCloneable` - Point doesn't make sense in this context --- src/closures/traits.md | 2 +- src/generics/generic-data.md | 2 +- src/generics/trait-bounds.md | 2 +- src/std-traits/comparisons.md | 8 ++++---- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/closures/traits.md b/src/closures/traits.md index e634d89a..4eb29b6f 100644 --- a/src/closures/traits.md +++ b/src/closures/traits.md @@ -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), diff --git a/src/generics/generic-data.md b/src/generics/generic-data.md index 4ff6ee40..8aa869d6 100644 --- a/src/generics/generic-data.md +++ b/src/generics/generic-data.md @@ -52,7 +52,7 @@ fn main() { - It is possible to write `impl VerbosityFilter { .. }`. - `VerbosityFilter` is still generic and you can use `VerbosityFilter`, but methods in this block will only be available for - `Point`. + `VerbosityFilter`. - 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. diff --git a/src/generics/trait-bounds.md b/src/generics/trait-bounds.md index 2ef928f4..3e8a80b5 100644 --- a/src/generics/trait-bounds.md +++ b/src/generics/trait-bounds.md @@ -25,7 +25,7 @@ fn main() {
-- 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. diff --git a/src/std-traits/comparisons.md b/src/std-traits/comparisons.md index 4bbd97bd..64dc0f63 100644 --- a/src/std-traits/comparisons.md +++ b/src/std-traits/comparisons.md @@ -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() {