Move SelectionSet and Into impl to selection module

This commit is contained in:
Nathan Sobo 2021-10-22 09:56:47 +02:00
parent 559774d6ac
commit 087ff28d0d
2 changed files with 20 additions and 18 deletions

View file

@ -73,12 +73,6 @@ pub struct Buffer {
lamport_clock: clock::Lamport,
}
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct SelectionSet {
pub selections: Arc<[Selection]>,
pub active: bool,
}
#[derive(Clone, Debug)]
pub struct Transaction {
start: clock::Global,
@ -2248,17 +2242,6 @@ impl<'a> Into<proto::Anchor> for &'a Anchor {
}
}
impl<'a> Into<proto::Selection> for &'a Selection {
fn into(self) -> proto::Selection {
proto::Selection {
id: self.id as u64,
start: Some((&self.start).into()),
end: Some((&self.end).into()),
reversed: self.reversed,
}
}
}
impl TryFrom<proto::Operation> for Operation {
type Error = anyhow::Error;