Remove unnecessary SourceChange
trait impls
This commit is contained in:
parent
97a6fa58cd
commit
ae83f32ee9
@ -121,12 +121,6 @@ fn from(source_file_edits: IntMap<FileId, TextEdit>) -> SourceChange {
|
||||
}
|
||||
}
|
||||
|
||||
impl From<IntMap<FileId, (TextEdit, Option<SnippetEdit>)>> for SourceChange {
|
||||
fn from(source_file_edits: IntMap<FileId, (TextEdit, Option<SnippetEdit>)>) -> SourceChange {
|
||||
SourceChange { source_file_edits, file_system_edits: Vec::new(), is_snippet: false }
|
||||
}
|
||||
}
|
||||
|
||||
impl FromIterator<(FileId, TextEdit)> for SourceChange {
|
||||
fn from_iter<T: IntoIterator<Item = (FileId, TextEdit)>>(iter: T) -> Self {
|
||||
let mut this = SourceChange::default();
|
||||
@ -135,16 +129,6 @@ fn from_iter<T: IntoIterator<Item = (FileId, TextEdit)>>(iter: T) -> Self {
|
||||
}
|
||||
}
|
||||
|
||||
impl FromIterator<(FileId, (TextEdit, Option<SnippetEdit>))> for SourceChange {
|
||||
fn from_iter<T: IntoIterator<Item = (FileId, (TextEdit, Option<SnippetEdit>))>>(
|
||||
iter: T,
|
||||
) -> Self {
|
||||
let mut this = SourceChange::default();
|
||||
this.extend(iter);
|
||||
this
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, PartialEq, Eq)]
|
||||
pub struct SnippetEdit(Vec<(u32, TextRange)>);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user