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

Replace usage of slice::from_raw_buf with slice::from_raw_parts #21926

Merged
merged 2 commits into from
Feb 6, 2015

Conversation

mzabaluev
Copy link
Contributor

New functions, slice::from_raw_parts and slice::from_raw_parts_mut,
are added to implement the lifetime convention as agreed in rust-lang/rfcs#556.
The functions slice::from_raw_buf and slice::from_raw_mut_buf are
left deprecated for the time being.

Holding back on changing the signature of std::ffi::c_str_to_bytes as consensus in rust-lang/rfcs#592 is building to replace it with a composition of other functions.

Contribution to #21923.

@rust-highfive
Copy link
Collaborator

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @alexcrichton (or someone else) soon.

If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. The way Github handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes.

Please see CONTRIBUTING.md for more information.

@alexcrichton
Copy link
Member

Thanks @mzabaluev! This looks great to me, I agree it's best to hold off on c_str_to_bytes for now.

r? @aturon as well, I'm happy with the naming of from_raw_parts as it mirrors Vec::from_raw_parts but I'd like a second opinion as well.

@rust-highfive rust-highfive assigned aturon and unassigned alexcrichton Feb 4, 2015
@aturon
Copy link
Member

aturon commented Feb 4, 2015

Looks good to me too, thanks!

@bors: r+ 1bf653b

@bors
Copy link
Contributor

bors commented Feb 5, 2015

⌛ Testing commit 1bf653b with merge 50612c6...

@bors
Copy link
Contributor

bors commented Feb 5, 2015

💔 Test failed - auto-mac-32-opt

New functions, slice::from_raw_parts and slice::from_raw_parts_mut,
are added to implement the lifetime convention as agreed in RFC PR rust-lang#556.
The functions slice::from_raw_buf and slice::from_raw_mut_buf are
left deprecated for the time being.
@mzabaluev
Copy link
Contributor Author

Rebased: one more use of from_raw_mut_buf has been added with new io.

@alexcrichton
Copy link
Member

@bors: r+ fb6b970

@bors
Copy link
Contributor

bors commented Feb 6, 2015

⌛ Testing commit fb6b970 with merge 68e7ae8...

@bors
Copy link
Contributor

bors commented Feb 6, 2015

💔 Test failed - auto-win-64-nopt-t

@alexcrichton
Copy link
Member

@bors: retry

@bors
Copy link
Contributor

bors commented Feb 6, 2015

⌛ Testing commit fb6b970 with merge db851fd...

Manishearth added a commit to Manishearth/rust that referenced this pull request Feb 6, 2015
 New functions, `slice::from_raw_parts` and `slice::from_raw_parts_mut`,
are added to implement the lifetime convention as agreed in rust-lang/rfcs#556.
The functions `slice::from_raw_buf` and `slice::from_raw_mut_buf` are
left deprecated for the time being.

Holding back on changing the signature of `std::ffi::c_str_to_bytes` as consensus in rust-lang/rfcs#592 is building to replace it with a composition of other functions.

Contribution to rust-lang#21923.
@bors
Copy link
Contributor

bors commented Feb 6, 2015

💔 Test failed - auto-win-32-nopt-t

@alexcrichton
Copy link
Member

@bors: retry

@bors
Copy link
Contributor

bors commented Feb 6, 2015

⌛ Testing commit fb6b970 with merge b75b21c...

bors added a commit that referenced this pull request Feb 6, 2015
New functions, `slice::from_raw_parts` and `slice::from_raw_parts_mut`,
are added to implement the lifetime convention as agreed in rust-lang/rfcs#556.
The functions `slice::from_raw_buf` and `slice::from_raw_mut_buf` are
left deprecated for the time being.

Holding back on changing the signature of `std::ffi::c_str_to_bytes` as consensus in rust-lang/rfcs#592 is building to replace it with a composition of other functions.

Contribution to #21923.
@bors bors merged commit fb6b970 into rust-lang:master Feb 6, 2015
@aturon aturon mentioned this pull request Feb 6, 2015
38 tasks
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