From 5a855654de7ffb09681002ba6685a4234ac0a392 Mon Sep 17 00:00:00 2001 From: Kornel Date: Wed, 6 Nov 2024 18:54:03 +0000 Subject: [PATCH] Inline str::repeat --- library/alloc/src/str.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/library/alloc/src/str.rs b/library/alloc/src/str.rs index 26c1ba2a5c4..6fee8d3fe33 100644 --- a/library/alloc/src/str.rs +++ b/library/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)) } }