File tree 1 file changed +3
-3
lines changed
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ pub struct CString {
27
27
priv owns_buffer_ : bool ,
28
28
}
29
29
30
- impl < ' self > CString {
30
+ impl CString {
31
31
/// Create a C String from a pointer.
32
32
pub fn new ( buf : * libc:: c_char , owns_buffer : bool ) -> CString {
33
33
CString { buf : buf, owns_buffer_ : owns_buffer }
@@ -80,7 +80,7 @@ impl<'self> CString {
80
80
/// # Failure
81
81
///
82
82
/// Fails if the CString is null.
83
- pub fn as_bytes ( & self ) -> & ' self [ u8 ] {
83
+ pub fn as_bytes < ' a > ( & ' a self ) -> & ' a [ u8 ] {
84
84
if self . buf . is_null ( ) { fail ! ( "CString is null!" ) ; }
85
85
unsafe {
86
86
let len = libc:: strlen ( self . buf ) as uint ;
@@ -89,7 +89,7 @@ impl<'self> CString {
89
89
}
90
90
91
91
/// Return a CString iterator.
92
- fn iter ( & self ) -> CStringIterator < ' self > {
92
+ fn iter < ' a > ( & ' a self ) -> CStringIterator < ' a > {
93
93
CStringIterator {
94
94
ptr : self . buf ,
95
95
lifetime : unsafe { cast:: transmute ( self . buf ) } ,
You can’t perform that action at this time.
0 commit comments