File tree 1 file changed +1
-12
lines changed
1 file changed +1
-12
lines changed Original file line number Diff line number Diff line change @@ -276,7 +276,7 @@ impl CString {
276
276
/// terminator).
277
277
#[ inline]
278
278
pub fn len ( & self ) -> uint {
279
- unsafe { libc:: strlen ( self . buf ) as uint }
279
+ unsafe { libc:: strlen ( self . as_ptr ( ) ) as uint }
280
280
}
281
281
282
282
/// Returns if there are no bytes in this string
@@ -295,17 +295,6 @@ impl Drop for CString {
295
295
}
296
296
}
297
297
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
309
298
impl fmt:: Show for CString {
310
299
fn fmt ( & self , f : & mut fmt:: Formatter ) -> fmt:: Result {
311
300
String :: from_utf8_lossy ( self . as_bytes_no_nul ( ) ) . fmt ( f)
You can’t perform that action at this time.
0 commit comments