mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 20:42:04 +00:00
a number of code simplifications
This commit is contained in:
parent
3987c835f2
commit
ac3844a0bb
13 changed files with 99 additions and 124 deletions
|
@ -334,11 +334,9 @@ pub fn source_edit_from_references(
|
|||
}
|
||||
_ => false,
|
||||
};
|
||||
if !has_emitted_edit {
|
||||
if !edited_ranges.contains(&range.start()) {
|
||||
edit.replace(range, new_name.to_string());
|
||||
edited_ranges.push(range.start());
|
||||
}
|
||||
if !has_emitted_edit && !edited_ranges.contains(&range.start()) {
|
||||
edit.replace(range, new_name.to_string());
|
||||
edited_ranges.push(range.start());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue