Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

exercises/05_vecs/vecs1.rs: TODO clarification #2194

Open
hikojlu opened this issue Jan 7, 2025 · 1 comment
Open

exercises/05_vecs/vecs1.rs: TODO clarification #2194

hikojlu opened this issue Jan 7, 2025 · 1 comment

Comments

@hikojlu
Copy link

hikojlu commented Jan 7, 2025

exercises/05_vecs/vecs1.rs:

let a = [10, 20, 30, 40];
// TODO: Create a vector called `v` which contains the exact same elements as in the array `a`
// Use the vector macro

vec! macro can only be used like this: vec![10, 20, 30, 40].
Is it intended to be like this? I guess, it would make more sense to use Vec::from(a)

@frroossst
Copy link
Contributor

I think what the exercise intended was vec![10, 20, 30, 40]

Although it wouldn't make much of a difference if you use Vec::from or the vec! macro

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants