Add IntoMaybeOwned
impl for StrBuf
to ease conversion to MaybeOwned
.
This commit is contained in:
parent
39b271f4a3
commit
7f88cfde18
@ -564,6 +564,11 @@ impl<'a> IntoMaybeOwned<'a> for ~str {
|
|||||||
fn into_maybe_owned(self) -> MaybeOwned<'a> { Owned(self) }
|
fn into_maybe_owned(self) -> MaybeOwned<'a> { Owned(self) }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl<'a> IntoMaybeOwned<'a> for StrBuf {
|
||||||
|
#[inline]
|
||||||
|
fn into_maybe_owned(self) -> MaybeOwned<'a> { Owned(self.into_owned()) }
|
||||||
|
}
|
||||||
|
|
||||||
impl<'a> IntoMaybeOwned<'a> for &'a str {
|
impl<'a> IntoMaybeOwned<'a> for &'a str {
|
||||||
#[inline]
|
#[inline]
|
||||||
fn into_maybe_owned(self) -> MaybeOwned<'a> { Slice(self) }
|
fn into_maybe_owned(self) -> MaybeOwned<'a> { Slice(self) }
|
||||||
|
Loading…
Reference in New Issue
Block a user