Skip to content

add split_off method to vec with tests #21608

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

JeffBelgum
Copy link
Contributor

@rust-highfive
Copy link
Contributor

r? @alexcrichton

(rust_highfive has picked a reviewer for you, use r? to override)

@alexcrichton
Copy link
Member

r? @gankro

@rust-highfive rust-highfive assigned Gankra and unassigned alexcrichton Jan 25, 2015
/// Splits the collection into two at the given index.
///
/// Returns a newly allocated `Self`. `self` contains elements `[0..at]`,
/// and the returned `Self` contains elements `[at ..]`.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm a bit nervosd about this since this is accurate Rust notation, but confusing as math notation.

probably fine as is, though.

@JeffBelgum
Copy link
Contributor Author

@gankro I've made all the changes required by the comments, please review. I'll squash my commits down if it looks good.

@Gankra
Copy link
Contributor

Gankra commented Jan 26, 2015

r=me with assert message and squash

@JeffBelgum
Copy link
Contributor Author

I was going off the (lack of) message in slice.split_at

@JeffBelgum JeffBelgum force-pushed the collections-reform-issue-19986-add-append-and-split-off branch from 8696e9a to b93843e Compare January 26, 2015 22:09
@JeffBelgum
Copy link
Contributor Author

r? @gankro

@Gankra
Copy link
Contributor

Gankra commented Jan 26, 2015

@bors r+ b938 rollup

barosl added a commit to barosl/rust that referenced this pull request Jan 27, 2015
Manishearth added a commit to Manishearth/rust that referenced this pull request Jan 27, 2015
@bors bors merged commit b93843e into rust-lang:master Jan 28, 2015
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

Successfully merging this pull request may close these issues.

5 participants