Skip to content

Commit 95bff3e

Browse files
committed
Inline str::repeat
1 parent 28f7e7b commit 95bff3e

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

alloc/src/str.rs

+1
Original file line numberDiff line numberDiff line change
@@ -531,6 +531,7 @@ impl str {
531531
#[rustc_allow_incoherent_impl]
532532
#[must_use]
533533
#[stable(feature = "repeat_str", since = "1.16.0")]
534+
#[inline]
534535
pub fn repeat(&self, n: usize) -> String {
535536
unsafe { String::from_utf8_unchecked(self.as_bytes().repeat(n)) }
536537
}

0 commit comments

Comments
 (0)