mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 04:19:13 +00:00
Remove LocalEdit usage
This commit is contained in:
parent
58e77660de
commit
9bd8336c51
2 changed files with 17 additions and 16 deletions
|
@ -279,7 +279,14 @@ impl Analysis {
|
|||
/// stuff like trailing commas.
|
||||
pub fn join_lines(&self, frange: FileRange) -> SourceChange {
|
||||
let file = self.db.parse(frange.file_id);
|
||||
SourceChange::from_local_edit(frange.file_id, join_lines::join_lines(&file, frange.range))
|
||||
let file_edit =
|
||||
SourceFileEdit { file_id: frange.file_id, edit: join_lines::join_lines(&file, frange) };
|
||||
SourceChange {
|
||||
label: "join lines".to_string(),
|
||||
source_file_edits: vec![file_edit],
|
||||
file_system_edits: vec![],
|
||||
cursor_position: None,
|
||||
}
|
||||
}
|
||||
|
||||
/// Returns an edit which should be applied when opening a new line, fixing
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue