From a9f0c7bf1f00ab19733953d3121d462eede34466 Mon Sep 17 00:00:00 2001 From: mo8it Date: Thu, 20 Jun 2024 01:00:06 +0200 Subject: vecs1 solution --- rustlings-macros/info.toml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'rustlings-macros/info.toml') diff --git a/rustlings-macros/info.toml b/rustlings-macros/info.toml index cd85dcc..21a27dd 100644 --- a/rustlings-macros/info.toml +++ b/rustlings-macros/info.toml @@ -307,8 +307,9 @@ 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. +2. The second way is to use the `vec![]` macro and define your elements + inside the square brackets. This way is simpler when you exactly know + the initial values. Check this chapter: https://doc.rust-lang.org/stable/book/ch08-01-vectors.html of the Rust book to learn more. -- cgit v1.2.3