about summary refs log tree commit diff
path: root/library/alloc/src
diff options
context:
space:
mode:
authorNicholas Nethercote <n.nethercote@gmail.com>2025-04-23 15:18:16 +1000
committerNicholas Nethercote <n.nethercote@gmail.com>2025-04-28 06:56:13 +1000
commitbc8df506f643d16fa4cd76f0e03e50a1a84fd2e1 (patch)
tree9551a1e6427559b1450eebd4ce58539863bca6a2 /library/alloc/src
parentcb31a009e3e735ab08613cec2d8a5a754e65596f (diff)
downloadrust-bc8df506f643d16fa4cd76f0e03e50a1a84fd2e1.tar.gz
rust-bc8df506f643d16fa4cd76f0e03e50a1a84fd2e1.zip
Streamline the `format` macro.
Removing the unnecessary local variable speeds up compilation a little.
Diffstat (limited to 'library/alloc/src')
-rw-r--r--library/alloc/src/macros.rs3
1 files changed, 1 insertions, 2 deletions
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)*))
         })
     }
 }