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

Array and List in Rust #1328

Closed
CarrotDLaw opened this issue May 1, 2024 · 2 comments
Closed

Array and List in Rust #1328

CarrotDLaw opened this issue May 1, 2024 · 2 comments

Comments

@CarrotDLaw
Copy link
Contributor

CarrotDLaw commented May 1, 2024

The Rust codes in Chapter 4.1 Array and Chapter 4.3 List both use vector instead of array. Like the approaches of other languages like C++ and Java, the code in Chapter 4.1 Array should use array to differentiate the concept of array and list.

For example, in Chapter 4.1.1 Initializing Arrays,

let nums: [i32; 5] = [1, 2, 3, 4, 5];

instead of

let nums: Vec<i32> = vec![1, 3, 2, 5, 4];
@krahets
Copy link
Owner

krahets commented May 1, 2024

I agree. Would you like to help update the Rust implementation(both in codes/rust and docs/) for "4.1 array" by submitting a PR? Thx!

@CarrotDLaw
Copy link
Contributor Author

For sure, I would like to help! I will start in the coming weeks.

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