diff options
| author | bors <bors@rust-lang.org> | 2025-04-30 04:04:21 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2025-04-30 04:04:21 +0000 |
| commit | 427288b3ce2d574847fdb41cc3184c893750e09a (patch) | |
| tree | da53c66372e8ab8e65c01bb2fbc76572ee849863 /library/alloc/src | |
| parent | f242d6c26cc6fc187257bd1be9590b4b39632425 (diff) | |
| parent | bc8df506f643d16fa4cd76f0e03e50a1a84fd2e1 (diff) | |
| download | rust-427288b3ce2d574847fdb41cc3184c893750e09a.tar.gz rust-427288b3ce2d574847fdb41cc3184c893750e09a.zip | |
Auto merge of #140188 - nnethercote:streamline-format-macro, r=cuviper
Streamline the `format` macro. Removing the unnecessary local variable speeds up compilation a little. r? `@cuviper`
Diffstat (limited to 'library/alloc/src')
| -rw-r--r-- | library/alloc/src/macros.rs | 3 |
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)*)) }) } } |
