From de2ec62f363bd3feb74bdbd6a8af2494503cc777 Mon Sep 17 00:00:00 2001 From: Reid 'arrdem' McKenzie Date: Sun, 25 Dec 2022 22:53:49 -0700 Subject: [PATCH] Drop WAL to remove warnings for now --- src/stack.rs | 1 - src/stack/wal.rs | 62 ------------------------------------------------ 2 files changed, 63 deletions(-) delete mode 100644 src/stack/wal.rs diff --git a/src/stack.rs b/src/stack.rs index e982d5f..b4ff189 100644 --- a/src/stack.rs +++ b/src/stack.rs @@ -1,6 +1,5 @@ pub mod arrs; pub mod pop; -pub mod wal; use std; use std::result::Result; diff --git a/src/stack/wal.rs b/src/stack/wal.rs deleted file mode 100644 index 7c02222..0000000 --- a/src/stack/wal.rs +++ /dev/null @@ -1,62 +0,0 @@ -use std::{cell::RefCell, rc::Rc}; - -use super::{Stack, StackError}; - -#[derive(Debug)] -enum StackOp { - Push1(u8), - Push2(u16), - Pop1(), - Pop2(), -} - -/** - * A writeahead log wrapping a read copy of another stack. - * Can be committed - */ -#[derive(Debug)] -pub struct StackWAL { - log: Vec, - _idx: u8, - wrapped: Rc>, -} - -impl StackWAL { - pub fn new(wrapped: Rc>) -> StackWAL { - return StackWAL { - log: vec![], - _idx: wrapped.borrow().idx(), - wrapped: wrapped.clone(), - }; - } -} - -impl Stack for StackWAL { - fn idx(&self) -> u8 { - return self._idx; - } - fn push1(&mut self, val: u8) -> Result<(), StackError> { - unimplemented!() - } - fn push2(&mut self, val: u16) -> Result<(), StackError> { - unimplemented!() - } - fn get1(&self, idx: u8) -> Result { - unimplemented!() - } - fn get2(&self, idx: u8) -> Result { - unimplemented!() - } - fn peek1(&self) -> Result { - unimplemented!() - } - fn peek2(&self) -> Result { - unimplemented!() - } - fn pop1(&mut self) -> Result { - unimplemented!() - } - fn pop2(&mut self) -> Result { - unimplemented!() - } -}