diff options
-rw-r--r-- | ripple/minitrace/src/main.rs | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/ripple/minitrace/src/main.rs b/ripple/minitrace/src/main.rs index ca0ce65..bc22563 100644 --- a/ripple/minitrace/src/main.rs +++ b/ripple/minitrace/src/main.rs @@ -89,12 +89,7 @@ impl Process { let mut buf = vec![]; mem.read_until(0, &mut buf)?; - // TODO(V): replace with CString::from_vec_with_nul when we update to Rust 1.58 - if buf.pop() != Some(0) { - bail!("Couldn't find null terminator"); - } - - Ok(CString::new(buf).expect("logic error")) + Ok(CString::from_vec_with_nul(buf).expect("logic error")) } } |