Auto merge of #100497 - kadiwa4:remove_clone_into_iter, r=cjgillot
Avoid cloning a collection only to iterate over it `@rustbot` label: +C-cleanup
This commit is contained in:
@@ -759,7 +759,7 @@ impl<'a> Parser<'a> {
|
||||
/// This is to avoid losing unclosed delims errors `create_snapshot_for_diagnostic` clears.
|
||||
pub(super) fn restore_snapshot(&mut self, snapshot: SnapshotParser<'a>) {
|
||||
*self = snapshot.parser;
|
||||
self.unclosed_delims.extend(snapshot.unclosed_delims.clone());
|
||||
self.unclosed_delims.extend(snapshot.unclosed_delims);
|
||||
}
|
||||
|
||||
pub fn unclosed_delims(&self) -> &[UnmatchedBrace] {
|
||||
|
||||
Reference in New Issue
Block a user