summary refs log tree commit diff
path: root/ripple
diff options
context:
space:
mode:
Diffstat (limited to 'ripple')
-rw-r--r--ripple/minitrace/src/main.rs7
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"))
 	}
 }