From: Ralf Jung Date: Fri, 28 Apr 2023 13:35:11 +0000 (+0200) Subject: Merge pull request #40 from bzindovic/bzindovic-part06-typo-fix X-Git-Url: https://git.ralfj.de/rust-101.git/commitdiff_plain/de20ea2de7cb19c2c379fcd61279e13da9c8193d?hp=a16f3d282a991ef1c28fded477f9a1d30c6f3b5c Merge pull request #40 from bzindovic/bzindovic-part06-typo-fix Fix a typo in part 6 --- diff --git a/src/part01.rs b/src/part01.rs index a4537ac..e00cf53 100644 --- a/src/part01.rs +++ b/src/part01.rs @@ -87,7 +87,7 @@ impl NumberOrNothing { //@ methods on an `enum` (and also on `struct`, which we will learn about later) //@ is independent of the definition of the type. `self` is like `this` in other //@ languages, and its type is always implicit. So `print` is now a method that -//@ takes as first argument a `NumberOrNothing`, just like `print_number_or_nothing`. +//@ takes `NumberOrNothing` as the first argument, just like `print_number_or_nothing`. //@ //@ Try making `number_or_default` from above an inherent method as well! diff --git a/src/part04.rs b/src/part04.rs index 21654cd..2381ff4 100644 --- a/src/part04.rs +++ b/src/part04.rs @@ -106,7 +106,7 @@ fn shared_ref_demo() { //@ their official name. //@ As an example, consider a function which increments every element of a vector by 1. -//@ The type `&mut Vec` is the type of mutable references to `vec`. Because the reference +//@ The type `&mut Vec` is the type of mutable references to `Vec`. Because the reference //@ is mutable, we can use a mutable iterator, providing mutable references to the elements. fn vec_inc(v: &mut Vec) { for e in v.iter_mut() {