From aecd6e61809a9877015eac369e167e06739c5fed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?On=C3=A8?= <43485962+c-git@users.noreply.github.com> Date: Thu, 23 May 2024 08:29:37 -0400 Subject: [PATCH] typos (#41) * that to than * add missing s * an to a Next letter is a consonant sound --- book/src/04_traits/07_sized.md | 2 +- book/src/04_traits/08_from.md | 2 +- book/src/04_traits/09_assoc_vs_generic.md | 2 +- book/src/05_ticket_v2/02_match.md | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/book/src/04_traits/07_sized.md b/book/src/04_traits/07_sized.md index 0b4a12a..ddbfbdc 100644 --- a/book/src/04_traits/07_sized.md +++ b/book/src/04_traits/07_sized.md @@ -1,6 +1,6 @@ # `Sized` -There's more to `&str` that meets the eye, even after having +There's more to `&str` than meets the eye, even after having investigated deref coercion. From our previous [discussion on memory layouts](../03_ticket_v1/10_references_in_memory.md), it would have been reasonable to expect `&str` to be represented as a single `usize` on diff --git a/book/src/04_traits/08_from.md b/book/src/04_traits/08_from.md index 7fef761..ee48205 100644 --- a/book/src/04_traits/08_from.md +++ b/book/src/04_traits/08_from.md @@ -76,7 +76,7 @@ where // This is known as a **trait bound** // It specifies that this implementation applies exclusively // to types `T` that implement `Sized` -// You can require multiple trait to be implemented using +// You can require multiple traits to be implemented using // the `+` sign. E.g. `Sized + PartialEq` { inner: T, diff --git a/book/src/04_traits/09_assoc_vs_generic.md b/book/src/04_traits/09_assoc_vs_generic.md index f6d25c4..8961777 100644 --- a/book/src/04_traits/09_assoc_vs_generic.md +++ b/book/src/04_traits/09_assoc_vs_generic.md @@ -74,7 +74,7 @@ It uses both mechanisms: ### `RHS` `RHS` is a generic parameter to allow for different types to be added together. -For example, you'll find these two implementation in the standard library: +For example, you'll find these two implementations in the standard library: ```rust impl Add for u32 { diff --git a/book/src/05_ticket_v2/02_match.md b/book/src/05_ticket_v2/02_match.md index 348846f..c9f9bcd 100644 --- a/book/src/05_ticket_v2/02_match.md +++ b/book/src/05_ticket_v2/02_match.md @@ -23,7 +23,7 @@ impl Status { ``` A `match` statement that lets you compare a Rust value against a series of **patterns**. -You can think of it as a type-level `if`. If `status` is an `Done` variant, execute the first block; +You can think of it as a type-level `if`. If `status` is a `Done` variant, execute the first block; if it's a `InProgress` or `ToDo` variant, execute the second block. ## Exhaustiveness