We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 116fc31 commit 5a85565Copy full SHA for 5a85565
library/alloc/src/str.rs
@@ -531,6 +531,7 @@ impl str {
531
#[rustc_allow_incoherent_impl]
532
#[must_use]
533
#[stable(feature = "repeat_str", since = "1.16.0")]
534
+ #[inline]
535
pub fn repeat(&self, n: usize) -> String {
536
unsafe { String::from_utf8_unchecked(self.as_bytes().repeat(n)) }
537
}
0 commit comments