Skip to content

Commit f4e1b2f

Browse files
committed
Use into_bytes directly
1 parent a1c5893 commit f4e1b2f

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

library/std/src/sys/args/wali.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,7 @@ mod imp {
3939
__cl_copy_argv(ptr, idx);
4040
CString::from_raw(ptr)
4141
};
42-
let mut arg_buf = arg_buf.into_bytes_with_nul();
43-
let _ = arg_buf.pop();
44-
OsStringExt::from_vec(arg_buf)
42+
OsStringExt::from_vec(arg_buf.into_bytes())
4543
}
4644

4745
fn argc_argv() -> Vec<OsString> {

0 commit comments

Comments
 (0)