From 95bff3e6b5cb5a43cffbf7ba8927c19180541f38 Mon Sep 17 00:00:00 2001 From: Kornel Date: Wed, 6 Nov 2024 18:54:03 +0000 Subject: [PATCH] Inline str::repeat --- alloc/src/str.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/alloc/src/str.rs b/alloc/src/str.rs index 26c1ba2a5c485..6fee8d3fe3346 100644 --- a/alloc/src/str.rs +++ b/alloc/src/str.rs @@ -531,6 +531,7 @@ impl str { #[rustc_allow_incoherent_impl] #[must_use] #[stable(feature = "repeat_str", since = "1.16.0")] + #[inline] pub fn repeat(&self, n: usize) -> String { unsafe { String::from_utf8_unchecked(self.as_bytes().repeat(n)) } }