File tree Expand file tree Collapse file tree 1 file changed +1
-12
lines changed
Expand file tree Collapse file tree 1 file changed +1
-12
lines changed Original file line number Diff line number Diff 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
309298impl 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)
You can’t perform that action at this time.
0 commit comments