diff options
| author | sazid <sazidozon@gmail.com> | 2020-10-26 12:54:32 +0600 |
|---|---|---|
| committer | sazid <sazidozon@gmail.com> | 2020-10-31 01:10:49 +0600 |
| commit | 0c12fa31c57c03c6287458a0a8aca7afd057baf6 (patch) | |
| tree | 084c26744355eacdd32e40c9165a4b83b57a474b /info.toml | |
| parent | f38f42f17dd0e12cf3c1f4bcf27029a2e1c2a439 (diff) | |
feat: Add Vec exercises
Diffstat (limited to 'info.toml')
| -rw-r--r-- | info.toml | 30 |
1 files changed, 30 insertions, 0 deletions
@@ -370,6 +370,36 @@ its internal structure (the `fruits` and `veggies` modules and associated constants). It's almost there except for one keyword missing for each constant.""" +# COLLECTIONS + +[[exercises]] +name = "collections1" +path = "exercises/collections/vec1.rs" +mode = "test" +hint = """ +In Rust, there are two ways to define a Vector. + +1. One way is to use the `Vec::new()` function to create a new vector + and fill it with the `push()` method. + +2. The second way, which is simpler is to use the `vec![]` macro and + define your elements inside the square brackets. + +Check this chapter: https://doc.rust-lang.org/stable/book/ch08-01-vectors.html +of the Rust book to learn more. +""" + +[[exercises]] +name = "collections2" +path = "exercises/collections/vec2.rs" +mode = "test" +hint = """ +Hint 1: `i` is each element from the Vec as they are being iterated. + Can you try multiplying this? + +Hint 2: Check the suggestion from the compiler error ;) +""" + # MACROS [[exercises]] |
