summaryrefslogtreecommitdiff
path: root/info.toml
diff options
context:
space:
mode:
authorsazid <sazidozon@gmail.com>2020-10-26 12:54:32 +0600
committersazid <sazidozon@gmail.com>2020-10-31 01:10:49 +0600
commit0c12fa31c57c03c6287458a0a8aca7afd057baf6 (patch)
tree084c26744355eacdd32e40c9165a4b83b57a474b /info.toml
parentf38f42f17dd0e12cf3c1f4bcf27029a2e1c2a439 (diff)
feat: Add Vec exercises
Diffstat (limited to 'info.toml')
-rw-r--r--info.toml30
1 files changed, 30 insertions, 0 deletions
diff --git a/info.toml b/info.toml
index 2d0abdb..56605a7 100644
--- a/info.toml
+++ b/info.toml
@@ -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]]