Skip to content

Commit 4bdeb31

Browse files
committed
Add #[inline] to Borrow<str>::borrow for String.
1 parent af52207 commit 4bdeb31

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/libcollections/str.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -396,6 +396,7 @@ macro_rules! utf8_acc_cont_byte {
396396

397397
#[stable(feature = "rust1", since = "1.0.0")]
398398
impl Borrow<str> for String {
399+
#[inline]
399400
fn borrow(&self) -> &str { &self[..] }
400401
}
401402

0 commit comments

Comments
 (0)