From bc8df506f643d16fa4cd76f0e03e50a1a84fd2e1 Mon Sep 17 00:00:00 2001 From: Nicholas Nethercote Date: Wed, 23 Apr 2025 15:18:16 +1000 Subject: Streamline the `format` macro. Removing the unnecessary local variable speeds up compilation a little. --- library/alloc/src/macros.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'library') diff --git a/library/alloc/src/macros.rs b/library/alloc/src/macros.rs index 214192b8c9a..1e6e2ae8c36 100644 --- a/library/alloc/src/macros.rs +++ b/library/alloc/src/macros.rs @@ -105,8 +105,7 @@ macro_rules! vec { macro_rules! format { ($($arg:tt)*) => { $crate::__export::must_use({ - let res = $crate::fmt::format($crate::__export::format_args!($($arg)*)); - res + $crate::fmt::format($crate::__export::format_args!($($arg)*)) }) } } -- cgit 1.4.1-3-g733a5