diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2018-08-29 12:30:54 +0200 |
|---|---|---|
| committer | Matthias Krüger <matthias.krueger@famsik.de> | 2018-09-27 12:08:03 +0200 |
| commit | d24070bf8d58f40887b4b33f63c1c3d3df55c346 (patch) | |
| tree | a9c0f7b81448450d4cc479a7b5e2942ae0519914 /src/liballoc/string.rs | |
| parent | e999ebdb971a0bde03ec3fdfff901ac6613fcfa0 (diff) | |
| download | rust-d24070bf8d58f40887b4b33f63c1c3d3df55c346.tar.gz rust-d24070bf8d58f40887b4b33f63c1c3d3df55c346.zip | |
liballoc: mark str.to_owned() and String::from(&str) as #[inline].
Fixes #53681
Diffstat (limited to 'src/liballoc/string.rs')
| -rw-r--r-- | src/liballoc/string.rs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/liballoc/string.rs b/src/liballoc/string.rs index 837e17cf640..ab3f8fc2707 100644 --- a/src/liballoc/string.rs +++ b/src/liballoc/string.rs @@ -2196,6 +2196,7 @@ impl AsRef<[u8]> for String { #[stable(feature = "rust1", since = "1.0.0")] impl<'a> From<&'a str> for String { + #[inline] fn from(s: &'a str) -> String { s.to_owned() } |
