Skip to content

Commit fb9b279

Browse files
committed
std: c_str should use regions on methods
1 parent c8e4540 commit fb9b279

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/libstd/c_str.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ pub struct CString {
2727
priv owns_buffer_: bool,
2828
}
2929

30-
impl<'self> CString {
30+
impl CString {
3131
/// Create a C String from a pointer.
3232
pub fn new(buf: *libc::c_char, owns_buffer: bool) -> CString {
3333
CString { buf: buf, owns_buffer_: owns_buffer }
@@ -80,7 +80,7 @@ impl<'self> CString {
8080
/// # Failure
8181
///
8282
/// Fails if the CString is null.
83-
pub fn as_bytes(&self) -> &'self [u8] {
83+
pub fn as_bytes<'a>(&'a self) -> &'a [u8] {
8484
if self.buf.is_null() { fail!("CString is null!"); }
8585
unsafe {
8686
let len = libc::strlen(self.buf) as uint;
@@ -89,7 +89,7 @@ impl<'self> CString {
8989
}
9090

9191
/// Return a CString iterator.
92-
fn iter(&self) -> CStringIterator<'self> {
92+
fn iter<'a>(&'a self) -> CStringIterator<'a> {
9393
CStringIterator {
9494
ptr: self.buf,
9595
lifetime: unsafe { cast::transmute(self.buf) },

0 commit comments

Comments
 (0)