Repository navigation
Collections exercise - #315
Conversation
Deploying ferrous-systems-rust-exercises with
|
| Latest commit: |
805b4cc
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://a1455c77.ferrous-systems-rust-exercises.pages.dev |
| Branch Preview URL: | https://collections-exercise.ferrous-systems-rust-exercises.pages.dev |
269048e to
049950e
Compare
049950e to
be8b6ba
Compare
jonathanpallant
left a comment
There was a problem hiding this comment.
Looks good - just some minor nits.
In general, I think the example Type we put inline in the next should be in the same format the audience needs to write it in their own program. That is String is OK because that type is in the prelude, but std::collections::HashMap needs qualifying because it is not.
I proposed some text changes but I don't recommend just accepting them in the Github UI because the paragraphs will probably need re-wrapping. Also you could probably slightly reformat them to make them better - Github was only letting me apply suggestions to one line at a time.
| **A**: | ||
|
|
||
| Only if you use a [scoped thread](https://doc.rust-lang.org/std/thread/fn.scope.html) which | ||
| allows to borrow non-`'static` data. |
There was a problem hiding this comment.
| allows to borrow non-`'static` data. | |
| allows you to borrow non-`'static` data. |
|
On reflection, I think Q2 and Q3 are too advanced for this exercise. We would use this on day 2 of an Open Intro, and we don't cover threads and send/sync until the very end. Discussing |
|
Okay. Maybe they can be moved into another exercise though (possibly in adapted form?).
this could be an additional step for the exercise as well. |
If there's an exercise where they make sense, then sure! But that's another PR. |
3f9ba72 to
805b4cc
Compare
First draft of a collections exercise, fixes #16 .
The exercise itself is currently relatively short and only includes Vec, BTreeSet and HashMap. Maybe we should also add VecDeque? I included some quiz questions.