mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-12 08:36:03 +00:00
fix SourceFileEdit name
This commit is contained in:
parent
f897de5b78
commit
aa628f4749
@ -25,7 +25,7 @@ use crate::{
|
||||
db,
|
||||
symbol_index::{SymbolIndex, SymbolsDatabase, LibrarySymbolsQuery},
|
||||
AnalysisChange, RootChange, Cancelable, CrateId, Diagnostic, FileId,
|
||||
FileSystemEdit, FilePosition, Query, SourceChange, SourceFileNodeEdit,
|
||||
FileSystemEdit, FilePosition, Query, SourceChange, SourceFileEdit,
|
||||
ReferenceResolution,
|
||||
};
|
||||
|
||||
@ -518,7 +518,7 @@ impl AnalysisImpl {
|
||||
|
||||
impl SourceChange {
|
||||
pub(crate) fn from_local_edit(file_id: FileId, label: &str, edit: LocalEdit) -> SourceChange {
|
||||
let file_edit = SourceFileNodeEdit {
|
||||
let file_edit = SourceFileEdit {
|
||||
file_id,
|
||||
edits: edit.edit.into_atoms(),
|
||||
};
|
||||
|
@ -159,13 +159,13 @@ impl AnalysisHost {
|
||||
#[derive(Debug)]
|
||||
pub struct SourceChange {
|
||||
pub label: String,
|
||||
pub source_file_edits: Vec<SourceFileNodeEdit>,
|
||||
pub source_file_edits: Vec<SourceFileEdit>,
|
||||
pub file_system_edits: Vec<FileSystemEdit>,
|
||||
pub cursor_position: Option<FilePosition>,
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct SourceFileNodeEdit {
|
||||
pub struct SourceFileEdit {
|
||||
pub file_id: FileId,
|
||||
pub edits: Vec<AtomTextEdit>,
|
||||
}
|
||||
|
@ -2,7 +2,7 @@ use languageserver_types::{
|
||||
self, Location, Position, Range, SymbolKind, TextDocumentEdit, TextDocumentIdentifier,
|
||||
TextDocumentItem, TextDocumentPositionParams, Url, VersionedTextDocumentIdentifier,
|
||||
};
|
||||
use ra_analysis::{FileId, FileSystemEdit, SourceChange, SourceFileNodeEdit, FilePosition};
|
||||
use ra_analysis::{FileId, FileSystemEdit, SourceChange, SourceFileEdit, FilePosition};
|
||||
use ra_editor::{LineCol, LineIndex};
|
||||
use ra_text_edit::{AtomTextEdit, TextEdit};
|
||||
use ra_syntax::{SyntaxKind, TextRange, TextUnit};
|
||||
@ -256,7 +256,7 @@ fn translate_offset_with_edit(
|
||||
}
|
||||
}
|
||||
|
||||
impl TryConvWith for SourceFileNodeEdit {
|
||||
impl TryConvWith for SourceFileEdit {
|
||||
type Ctx = ServerWorld;
|
||||
type Output = TextDocumentEdit;
|
||||
fn try_conv_with(self, world: &ServerWorld) -> Result<TextDocumentEdit> {
|
||||
|
Loading…
Reference in New Issue
Block a user