about summary refs log tree commit diff
path: root/compiler/rustc_parse
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2022-11-18 10:30:47 +0100
committerMatthias Krüger <matthias.krueger@famsik.de>2022-11-18 10:30:47 +0100
commite3036df0032bb6726408a9f6705acaf38e55d59f (patch)
treee8038b599a8a02930643f8d84275c23f16d4982e /compiler/rustc_parse
parent83356b78c4ff3e7d84e977aa6143793545967301 (diff)
downloadrust-e3036df0032bb6726408a9f6705acaf38e55d59f.tar.gz
rust-e3036df0032bb6726408a9f6705acaf38e55d59f.zip
couple of clippy::perf fixes
Diffstat (limited to 'compiler/rustc_parse')
-rw-r--r--compiler/rustc_parse/src/parser/diagnostics.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_parse/src/parser/diagnostics.rs b/compiler/rustc_parse/src/parser/diagnostics.rs
index 0bbe073fe2a..62b6bdcf051 100644
--- a/compiler/rustc_parse/src/parser/diagnostics.rs
+++ b/compiler/rustc_parse/src/parser/diagnostics.rs
@@ -1657,14 +1657,14 @@ impl<'a> Parser<'a> {
                 let left = begin_par_sp;
                 let right = self.prev_token.span;
                 let left_snippet = if let Ok(snip) = sm.span_to_prev_source(left) &&
-                        !snip.ends_with(" ") {
+                        !snip.ends_with(' ') {
                                 " ".to_string()
                             } else {
                                 "".to_string()
                             };
 
                 let right_snippet = if let Ok(snip) = sm.span_to_next_source(right) &&
-                        !snip.starts_with(" ") {
+                        !snip.starts_with(' ') {
                                 " ".to_string()
                             } else {
                                 "".to_string()