- Remove confusing use of atomics. Use return values of async tasks
instead, to ensure all tasks are awaited.
- Remove use of `println!()`, which uses a global lock and cannot be
executed in parallel.
The goal here was to get the first bit of "muscle memory" for using the
async and await keywords. The little story should make it more intuitive
for users why asynchronous programming is needed in the first place.
This exercise will be moved to the location corresponding to the book in
a later commit, to keep the diff of this one clean.
Conversion between Celsius and Fahrenheit should be understandable to
most. Inverting the formula is still not very hard, but a little harder
than only multiplying by 100.
Learners were sometimes confused by the literal array. Their assumption
was that they are supposed to convert the array to a vector. Duplicating
the literal elements was not an intuitive solution.
This redesign avoids putting an identical array literal near the place
where learners are supposed to use the vec! macro.
This avoids confusion between `.into_iter()` and `.iter()`. On a slice,
both methods do the same (correct) thing. Using `.into_iter()` will
result in a clippy warning about the slice not being consumed.
Students do not have the necessary knowledge at this point to understand
what's happening with the iterator combinators. This topic is covered
well by the dedicated exercises about iterators later.
closes#2102
Some people would get stuck on this exercise, trying to understand the meaning
behind foo, fuzz, baz etc. Making the theme of the code make a little more sense
to humans should hopefully prevent people from getting confused by abstract and
non-sensical tests.