don't clone types that are copy
found via clippy
This commit is contained in:
parent
4884061838
commit
7fbd30b1ae
15 changed files with 18 additions and 20 deletions
|
|
@ -245,7 +245,7 @@ impl LintStore {
|
|||
|
||||
pub fn register_renamed(&mut self, old_name: &str, new_name: &str) {
|
||||
let target = match self.by_name.get(new_name) {
|
||||
Some(&Id(lint_id)) => lint_id.clone(),
|
||||
Some(&Id(lint_id)) => lint_id,
|
||||
_ => bug!("invalid lint renaming of {} to {}", old_name, new_name),
|
||||
};
|
||||
self.by_name.insert(old_name.to_string(), Renamed(new_name.to_string(), target));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue