From ca66b8128391a2423123a873f800139a55e194bf Mon Sep 17 00:00:00 2001 From: Erick Tryzelaar Date: Fri, 20 Sep 2013 13:24:23 -0700 Subject: [PATCH] std: Remove an unnecessary comment from c_str The documentation for `.with_c_str()` already says that the pointer will be deallocated before returning from the function. --- src/libstd/c_str.rs | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/libstd/c_str.rs b/src/libstd/c_str.rs index 8b5b780012b..49db9e4f3b0 100644 --- a/src/libstd/c_str.rs +++ b/src/libstd/c_str.rs @@ -277,9 +277,6 @@ impl<'self> ToCStr for &'self [u8] { } } - /// WARNING: This function uses an optimization to only malloc a temporary - /// CString when the source string is small. Do not save a reference to - /// the `*libc::c_char` as it may be invalid after this function call. fn with_c_str(&self, f: &fn(*libc::c_char) -> T) -> T { if self.len() < BUF_LEN { do self.as_imm_buf |self_buf, self_len| {