diff options
| author | Yuri Astrakhan <YuriAstrakhan@gmail.com> | 2023-07-24 00:08:09 -0400 |
|---|---|---|
| committer | Yuri Astrakhan <YuriAstrakhan@gmail.com> | 2023-07-24 00:08:09 -0400 |
| commit | e36b901933bbd4e747a7eddfbadf23bda93eba02 (patch) | |
| tree | 8126dbc53c48a963531e61e2dfe0843a1ada5a09 /compiler/rustc_errors/src/lib.rs | |
| parent | 8771282d4e7a5c4569e49d1f878fb3ba90a974d0 (diff) | |
| download | rust-e36b901933bbd4e747a7eddfbadf23bda93eba02.tar.gz rust-e36b901933bbd4e747a7eddfbadf23bda93eba02.zip | |
Optimize format usage
Per #112156, using `&` in `format!` may cause a small perf delay, so I tried to clean up one module at a time format usage. This PR includes a few removals of the ref in format (they do compile locally without the ref), as well as a few format inlining for consistency.
Diffstat (limited to 'compiler/rustc_errors/src/lib.rs')
| -rw-r--r-- | compiler/rustc_errors/src/lib.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_errors/src/lib.rs b/compiler/rustc_errors/src/lib.rs index 1da02e1bb01..eae7a46e07a 100644 --- a/compiler/rustc_errors/src/lib.rs +++ b/compiler/rustc_errors/src/lib.rs @@ -1485,7 +1485,7 @@ impl HandlerInner { let _ = self.fatal(errors); } (_, _) => { - let _ = self.fatal(format!("{}; {}", &errors, &warnings)); + let _ = self.fatal(format!("{errors}; {warnings}")); } } |
