We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 74c4ef8 commit f97392aCopy full SHA for f97392a
src/c_str.rs
@@ -432,7 +432,7 @@ impl CStrBuf {
432
/// If the given vector contains a NUL byte, then an error containing
433
/// the original vector and `NulError` information is returned.
434
pub fn from_vec(vec: Vec<u8>) -> Result<CStrBuf, IntoCStrError> {
435
- if let Some(pos) = vec.as_slice().position_elem(&NUL) {
+ if let Some(pos) = vec[].position_elem(&NUL) {
436
return Err(IntoCStrError {
437
cause: NulError { position: pos },
438
bytes: vec
0 commit comments