Remove unnecessary SourceChange trait impls

This commit is contained in:
DropDemBits 2023-07-12 02:36:37 -04:00
parent 97a6fa58cd
commit ae83f32ee9
No known key found for this signature in database
GPG Key ID: 7FE02A6C1EDFA075

View File

@ -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)>);