mirror of
https://github.com/rust-lang/rustlings.git
synced 2026-08-14 14:26:56 +00:00
Clarify hint of vecs1
A user got confused, thinking the two described methods are the *only* ones. Calling them "basic" makes clear there are other (non-basic) ones. discussed in: https://github.com/rust-lang/rustlings/discussions/2419
This commit is contained in:
parent
5e7a5d1721
commit
925321705e
@ -304,7 +304,7 @@ Now, you have another tool in your toolbox!"""
|
|||||||
name = "vecs1"
|
name = "vecs1"
|
||||||
dir = "05_vecs"
|
dir = "05_vecs"
|
||||||
hint = """
|
hint = """
|
||||||
In Rust, there are two ways to define a Vector.
|
In Rust, there are two basic ways to define a Vector.
|
||||||
1. One way is to use the `Vec::new()` function to create a new vector
|
1. One way is to use the `Vec::new()` function to create a new vector
|
||||||
and fill it with the `push()` method.
|
and fill it with the `push()` method.
|
||||||
2. The second way is to use the `vec![]` macro and define your elements
|
2. The second way is to use the `vec![]` macro and define your elements
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user