From 1d0eaf0d2a923f59b1f77c38919d9a03ff12588e Mon Sep 17 00:00:00 2001 From: ABel-216 <89543585+ABel-216@users.noreply.github.com> Date: Tue, 27 Feb 2024 20:26:11 +0000 Subject: [PATCH] fix(vecs1): added 3rd option in hint --- info.toml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/info.toml b/info.toml index 887662ab..d0cc7138 100644 --- a/info.toml +++ b/info.toml @@ -283,11 +283,12 @@ name = "vecs1" path = "exercises/05_vecs/vecs1.rs" mode = "test" hint = """ -In Rust, there are two ways to define a Vector. +In Rust, there are three 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. +3. Additionally, one can use `Vec::from()`, as in `Vec::from(a)` Check this chapter: https://doc.rust-lang.org/stable/book/ch08-01-vectors.html of the Rust book to learn more.