]> git.lizzy.rs Git - rust.git/commitdiff
Auto merge of #30614 - arcnmx:cstr-bytes, r=alexcrichton
authorbors <bors@rust-lang.org>
Tue, 23 Feb 2016 20:08:54 +0000 (20:08 +0000)
committerbors <bors@rust-lang.org>
Tue, 23 Feb 2016 20:08:54 +0000 (20:08 +0000)
I'm a bit iffy on the return type, but `Result` would also be a bit weird... The two error cases are `Unterminated` and `InteriorNul(usize)`.

I considered `from_chars(&[c_char])` but this meshes better with `as_bytes_with_nul()` and Rust code in general.

Should there also be a corresponding unsafe `from_bytes_unchecked` variant?


Trivial merge