mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-03 15:15:24 +00:00
avoid 'cloning' types that implement 'Copy'
This commit is contained in:
parent
3987c835f2
commit
95d14c393c
6 changed files with 7 additions and 7 deletions
|
@ -114,7 +114,7 @@ impl<'a> TtIter<'a> {
|
|||
('.', '.', Some('.' | '=')) | ('<', '<', Some('=')) | ('>', '>', Some('=')) => {
|
||||
let _ = self.next().unwrap();
|
||||
let _ = self.next().unwrap();
|
||||
Ok(smallvec![first, second.clone(), third.unwrap().clone()])
|
||||
Ok(smallvec![first, *second, *third.unwrap()])
|
||||
}
|
||||
('-' | '!' | '*' | '/' | '&' | '%' | '^' | '+' | '<' | '=' | '>' | '|', '=', _)
|
||||
| ('-' | '=' | '>', '>', _)
|
||||
|
@ -125,7 +125,7 @@ impl<'a> TtIter<'a> {
|
|||
| ('<', '<', _)
|
||||
| ('|', '|', _) => {
|
||||
let _ = self.next().unwrap();
|
||||
Ok(smallvec![first, second.clone()])
|
||||
Ok(smallvec![first, *second])
|
||||
}
|
||||
_ => Ok(smallvec![first]),
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue