You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, first of all I have to say I love the book. In my opinion its really well written and provides a nice introduction.
While reading I stumbled a little when the challenge was posed in Chapter 10-02 after listing 10-15, specifically the for loop, which reads:
for&item in list.iter(){if item > largest {
largest = item;}}
Specifically the line
for&item in list.iter(){
I do not remember coming across the concept of using an & in from of an item in a range based for loop in rust, even after asking some colleagues (who have worked with rust for nearly 3 years). I think this kind of destructuring or pattern matching should be mentioned at some point in the explaining text, maybe also with reference to Chapter 18-01. I might have missed it in my haste at some point, but explaining this also makes the explanation of the Copy trait a lot more obvious to me. I think this was already mentioned in #2121 although I think the focus there was on the copy trait.
Another thing that I noticed, was that while moving from Listing 10-3 to Listing 10-4 the code suddenly got extended from
for&item in list {
to
for&item in list.iter(){
Hope this can help to make the already amazing rust book a little better.
The text was updated successfully, but these errors were encountered:
Hi, first of all I have to say I love the book. In my opinion its really well written and provides a nice introduction.
While reading I stumbled a little when the challenge was posed in Chapter 10-02 after listing 10-15, specifically the for loop, which reads:
Specifically the line
I do not remember coming across the concept of using an
&
in from of an item in a range based for loop in rust, even after asking some colleagues (who have worked with rust for nearly 3 years). I think this kind of destructuring or pattern matching should be mentioned at some point in the explaining text, maybe also with reference to Chapter 18-01. I might have missed it in my haste at some point, but explaining this also makes the explanation of the Copy trait a lot more obvious to me. I think this was already mentioned in #2121 although I think the focus there was on the copy trait.Another thing that I noticed, was that while moving from Listing 10-3 to Listing 10-4 the code suddenly got extended from
to
Hope this can help to make the already amazing rust book a little better.
The text was updated successfully, but these errors were encountered: