rustlings 0

Published at 2024/06/06

#rust

rustlings

Date: 2024/06/06

So far Iā€™ve completed 29 of 96 exercises. Because my time on this has been sporadic, starting early December and continuing for a few exercises once a month, I expect to go through the exercises again in the future. Itā€™s nice that Iā€™ve done some of them.

tricky concept: ownership - exercise 30

? How does ownership work with pointers? example:

fn get_char(&data: String) borrows data. Without the & it does not. A function that takes ownership of an argument must have a non-borrowed argument.

note: function defined here
  --> exercises/move_semantics/move_semantics6.rs:24:4
   |
24 | fn string_uppercase(mut data: String) {
   |    ^^^^^^^^^^^^^^^^ ----------------
help: consider removing the borrow
   |
15 -     string_uppercase(&data);
15 +     string_uppercase(data);

nice

Itā€™s nice that ā€˜rustlings verifyā€™ provides some detailed output. Try to make my own rust programs provide context when they fail. rustlings -h gets me some command documentation. Itā€™s also satisfying to have a moment when the exercise is complete that I get to look at it - accomplished with the comment processing. To finish an exercise, I must change a comment ā€œI AM NOT DONEā€ to ā€œI AM DONEā€ - and then rustlings verify or rustlings watch will move on to the next exercise šŸ˜„.

questions

where do I get some documentation on my local system such as the rust book? Is it already here?

ooo resources!

ā€œThe Rust Programming Languageā€ and ā€œRust Programming By Exampleā€ are both books that I have on my system! Thanks, Humble Indie Bundle (rust edition! or maybe programming edition.)

No Last Words Ā© 2025