couple of clippy::perf fixes
This commit is contained in:
parent
83356b78c4
commit
e3036df003
11 changed files with 14 additions and 16 deletions
|
@ -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()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue