From 47a3ea2afe5444af9c8541e950987b11b99dd1f0 Mon Sep 17 00:00:00 2001 From: Shafkath Shuhan Date: Fri, 20 Jan 2023 12:28:40 -0500 Subject: [PATCH] wip --- .github/PULL_REQUEST_TEMPLATE/enhancement.md | 20 ----------- .github/PULL_REQUEST_TEMPLATE/trivial.md | 0 helix-view/src/session/state.rs | 8 ----- helix-view/src/session/undo.rs | 35 ++++++++++---------- 4 files changed, 18 insertions(+), 45 deletions(-) delete mode 100644 .github/PULL_REQUEST_TEMPLATE/enhancement.md delete mode 100644 .github/PULL_REQUEST_TEMPLATE/trivial.md delete mode 100644 helix-view/src/session/state.rs diff --git a/.github/PULL_REQUEST_TEMPLATE/enhancement.md b/.github/PULL_REQUEST_TEMPLATE/enhancement.md deleted file mode 100644 index d98c1024721bc..0000000000000 --- a/.github/PULL_REQUEST_TEMPLATE/enhancement.md +++ /dev/null @@ -1,20 +0,0 @@ -# Objective - -- Describe the objective or issue this PR addresses. -- If you're fixing a specific issue, say "Fixes #X". - -## Solution - -- Describe the solution used to achieve the objective above. - ---- - -## Changelog - -> This section is optional. If this was a trivial fix, or has no externally-visible impact, you can delete this section. - -- What changed as a result of this PR? -- If applicable, organize changes under "Added", "Changed", or "Fixed" sub-headings -- Stick to one or two sentences. If more detail is needed for a particular change, consider adding it to the "Solution" section - - If you can't summarize the work, your change may be unreasonably large / unrelated. Consider splitting your PR to make it easier to review and merge! - diff --git a/.github/PULL_REQUEST_TEMPLATE/trivial.md b/.github/PULL_REQUEST_TEMPLATE/trivial.md deleted file mode 100644 index e69de29bb2d1d..0000000000000 diff --git a/helix-view/src/session/state.rs b/helix-view/src/session/state.rs deleted file mode 100644 index e4c359e64ab6f..0000000000000 --- a/helix-view/src/session/state.rs +++ /dev/null @@ -1,8 +0,0 @@ -use std::path::PathBuf; - -use serde::{Deserialize, Serialize}; - -#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] -pub struct State { - buffers: Vec, -} diff --git a/helix-view/src/session/undo.rs b/helix-view/src/session/undo.rs index f719cf5a30194..fe241b6c729d1 100644 --- a/helix-view/src/session/undo.rs +++ b/helix-view/src/session/undo.rs @@ -1,28 +1,29 @@ use std::io::Result; use std::path::PathBuf; -use either::Either; use helix_core::history::History; +use helix_core::Transaction; -pub struct UndoFile<'a> { - path: PathBuf, - history: Either, +pub fn serialize(session: &mut Session, editor: &Editor) -> Result<()> { + todo!() } -impl<'a> UndoFile<'a> { - fn serialize(&self) -> Result<()> { - todo!() - } +pub fn deserialize(session: &Session, editor: &mut Editor) -> Result<()> { + todo!() +} - fn deserialize() -> Result { - todo!() - } +fn serialize_history(history: &History) -> Result<()> { + todo!() +} - fn serialize_transaction(&self) -> Result<()> { - todo!() - } +fn deserialize_history() -> Result { + todo!() +} + +fn serialize_transaction(transaction: &Transaction) -> Result<()> { + todo!() +} - fn deserialize_transaction(&self) -> Result<()> { - todo!() - } +fn deserialize_transaction() -> Result { + todo!() }