diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2023-11-08 00:47:51 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-11-08 00:47:51 +0100 |
| commit | 7552dd19adadcc42ed305ec81cc255a36b78c4bf (patch) | |
| tree | 3f725015af7498aa8850de6f45acae1203c5fe46 /compiler/rustc_errors/src | |
| parent | 3c6307240cc1c41ec18ac3b5f86add84aa286f77 (diff) | |
| parent | e8cf29b584ce684351ceacbf7e06be6c0874c9be (diff) | |
| download | rust-7552dd19adadcc42ed305ec81cc255a36b78c4bf.tar.gz rust-7552dd19adadcc42ed305ec81cc255a36b78c4bf.zip | |
Rollup merge of #117625 - nnethercote:clippy-perf, r=cuviper
Fix some clippy perf lints `@matthiaskrgr` gave me the output of a clippy run with perf lints enabled. This PR fixes ones that I thought were worth fixing. r? `@cuviper`
Diffstat (limited to 'compiler/rustc_errors/src')
| -rw-r--r-- | compiler/rustc_errors/src/emitter.rs | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/compiler/rustc_errors/src/emitter.rs b/compiler/rustc_errors/src/emitter.rs index 6d95fbcfad0..68dba860291 100644 --- a/compiler/rustc_errors/src/emitter.rs +++ b/compiler/rustc_errors/src/emitter.rs @@ -2362,11 +2362,7 @@ impl FileWithAnnotatedLines { let label = label.as_ref().map(|m| { normalize_whitespace( - &emitter - .translate_message(m, &args) - .map_err(Report::new) - .unwrap() - .to_string(), + &emitter.translate_message(m, &args).map_err(Report::new).unwrap(), ) }); |
