-
Notifications
You must be signed in to change notification settings - Fork 13.3k
docs: Vectors are to slices what String is to &str #24079
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
Conversation
I believe it's meant to say "arrays" instead of "slices". Slices aren't even mentioned until later in the page.
(rust_highfive has picked a reviewer for you, use r? to override) |
This is incorrect. Arrays own their data. |
@steveklabnik I think this sentence needs reworded or explained then. I took it to refer to the growable aspect of Vectors compared to arrays, like Strings are to &str, and not about data ownership. |
Let's shop it in this PR then. Do you have a suggestion? |
Yeah, let me think it over and update this later (on mobile right now). Thanks. |
@steveklabnik What if we remove the sentence from this paragraph:
and incorporate it into this one?
Also, let me know if that's incorrect in any way. |
I like it. I would still say "vector" and not "array" in the revision: A |
☔ The latest upstream changes (presumably #24195) made this pull request unmergeable. Please resolve the merge conflicts. |
(reassigning) |
@nhowell are you interested in keeping up with this PR? |
Yeah, I still would like to change this, and especially with the new TOC, it just doesn't seem to belong there. But I haven't thought of the best way to word it/move it to yet. Saying vector instead of array there just doesn't fit with the paragraph... I'll have something this weekend. |
Okay 👍 |
I was just looking over the book again before doing anything with this PR and noticed that you've updated the way you present it. I quite like it now, so, I'll go ahead and close this PR. Thanks! |
Ah yes! This PR did impact doing that though, so thanks :) |
This just doesn't sound right to me. I believe it's meant to say "arrays" instead of "slices". Slices aren't even mentioned until later in the page.
Please let me know if I'm just misunderstanding. Thanks