diff options
| author | Ryan Lopopolo <rjl@hyperbo.la> | 2020-03-02 21:17:58 -0800 |
|---|---|---|
| committer | Ryan Lopopolo <rjl@hyperbo.la> | 2020-03-02 21:17:58 -0800 |
| commit | 2a29726fcd09fac350e0a8c0d1dd78a8ae6de0ed (patch) | |
| tree | 985dd58c3f6c9e009dcbd77f28363f0cae5bbb62 /src/liballoc | |
| parent | 97b3d816152774e45d01d44cd5b44565dc7aba58 (diff) | |
| download | rust-2a29726fcd09fac350e0a8c0d1dd78a8ae6de0ed.tar.gz rust-2a29726fcd09fac350e0a8c0d1dd78a8ae6de0ed.zip | |
Implement From<&mut str> for String
Diffstat (limited to 'src/liballoc')
| -rw-r--r-- | src/liballoc/string.rs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/liballoc/string.rs b/src/liballoc/string.rs index f5afea15d65..43217ae9364 100644 --- a/src/liballoc/string.rs +++ b/src/liballoc/string.rs @@ -2225,6 +2225,14 @@ impl From<&str> for String { } } +#[stable(feature = "???", since = "1.43.0")] +impl From<&mut str> for String { + #[inline] + fn from(s: &mut str) -> String { + s.to_owned() + } +} + #[stable(feature = "from_ref_string", since = "1.35.0")] impl From<&String> for String { #[inline] |
