Skip to content

Commit

Permalink
CStr impl stability
Browse files Browse the repository at this point in the history
  • Loading branch information
arcnmx committed Dec 31, 2015
1 parent 965556d commit 53878e7
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/libstd/ffi/c_str.rs
Original file line number Diff line number Diff line change
Expand Up @@ -522,14 +522,14 @@ impl ToOwned for CStr {
}
}

#[unstable(feature = "cstring_asref", reason = "recently added", issue = "0")]
#[stable(feature = "cstring_asref", since = "1.7.0")]
impl<'a> From<&'a CStr> for CString {
fn from(s: &'a CStr) -> CString {
s.to_owned()
}
}

#[unstable(feature = "cstring_asref", reason = "recently added", issue = "0")]
#[stable(feature = "cstring_asref", since = "1.7.0")]
impl ops::Index<ops::RangeFull> for CString {
type Output = CStr;

Expand All @@ -539,14 +539,14 @@ impl ops::Index<ops::RangeFull> for CString {
}
}

#[unstable(feature = "cstring_asref", reason = "recently added", issue = "0")]
#[stable(feature = "cstring_asref", since = "1.7.0")]
impl AsRef<CStr> for CStr {
fn as_ref(&self) -> &CStr {
self
}
}

#[unstable(feature = "cstring_asref", reason = "recently added", issue = "0")]
#[stable(feature = "cstring_asref", since = "1.7.0")]
impl AsRef<CStr> for CString {
fn as_ref(&self) -> &CStr {
self
Expand Down

0 comments on commit 53878e7

Please sign in to comment.