Skip to content

Commit 7dd96c9

Browse files
committed
Fix broken rebase
1 parent 3493847 commit 7dd96c9

File tree

1 file changed

+1
-12
lines changed

1 file changed

+1
-12
lines changed

src/librustrt/c_str.rs

+1-12
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ impl CString {
276276
/// terminator).
277277
#[inline]
278278
pub fn len(&self) -> uint {
279-
unsafe { libc::strlen(self.buf) as uint }
279+
unsafe { libc::strlen(self.as_ptr()) as uint }
280280
}
281281

282282
/// Returns if there are no bytes in this string
@@ -295,17 +295,6 @@ impl Drop for CString {
295295
}
296296
}
297297

298-
<<<<<<< HEAD
299-
=======
300-
impl Collection for CString {
301-
/// Return the number of bytes in the CString (not including the NUL terminator).
302-
#[inline]
303-
fn len(&self) -> uint {
304-
unsafe { libc::strlen(self.as_ptr()) as uint }
305-
}
306-
}
307-
308-
>>>>>>> Split CString::new into CString::new and CString::new_owned
309298
impl fmt::Show for CString {
310299
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
311300
String::from_utf8_lossy(self.as_bytes_no_nul()).fmt(f)

0 commit comments

Comments
 (0)