-
Notifications
You must be signed in to change notification settings - Fork 13.1k
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
Improve docs for vec_extend_from_within #105030
Improve docs for vec_extend_from_within #105030
Conversation
r? @thomcc (rustbot has picked a reviewer for you, use r? to override) |
Hey! It looks like you've submitted a new PR for the library teams! If this PR contains changes to any Examples of
|
e5ddeeb
to
14e0869
Compare
@rustbot label +A-docs |
I think these your changes are well-motivated but probably need some rewording. I don't really feel like I'm the person to help figure that out though, so I'll reroll. Sorry for the delay. r? libs |
@@ -2392,26 +2392,31 @@ impl<T: Clone, A: Allocator> Vec<T, A> { | |||
self.spec_extend(other.iter()) | |||
} | |||
|
|||
/// Copies elements from `src` range to the end of the vector. | |||
/// Appends elements specified by the `src` parameter to the end of the vector. | |||
/// The `src` parameter is of type [`RangeBounds`], which means that |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
RangeBounds
is a trait here, not a type. Not exactly sure what the best way to specify this is, though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since RangeBounds
is in the signature anyway, and the examples show use of ranges, could this just be:
Copies elements from one part of the vector to the end.
src
is the range that the elements will be copied from.
This would be consistent with the wording used in slice::copy_within
Improves the documentation for the extends_from_within function for VEC
Fixes #104762