mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 04:44:57 +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
|
@ -126,7 +126,7 @@ fn next_op(
|
|||
src.next().expect("first token already peeked");
|
||||
// Note that the '$' itself is a valid token inside macro_rules.
|
||||
let second = match src.next() {
|
||||
None => return Ok(Op::Punct(smallvec![p.clone()])),
|
||||
None => return Ok(Op::Punct(smallvec![*p])),
|
||||
Some(it) => it,
|
||||
};
|
||||
match second {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue