Drop WAL to remove warnings for now
This commit is contained in:
parent
93476015c5
commit
de2ec62f36
2 changed files with 0 additions and 63 deletions
|
@ -1,6 +1,5 @@
|
||||||
pub mod arrs;
|
pub mod arrs;
|
||||||
pub mod pop;
|
pub mod pop;
|
||||||
pub mod wal;
|
|
||||||
|
|
||||||
use std;
|
use std;
|
||||||
use std::result::Result;
|
use std::result::Result;
|
||||||
|
|
|
@ -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<StackOp>,
|
|
||||||
_idx: u8,
|
|
||||||
wrapped: Rc<RefCell<dyn Stack>>,
|
|
||||||
}
|
|
||||||
|
|
||||||
impl StackWAL {
|
|
||||||
pub fn new(wrapped: Rc<RefCell<dyn Stack>>) -> 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<u8, StackError> {
|
|
||||||
unimplemented!()
|
|
||||||
}
|
|
||||||
fn get2(&self, idx: u8) -> Result<u16, StackError> {
|
|
||||||
unimplemented!()
|
|
||||||
}
|
|
||||||
fn peek1(&self) -> Result<u8, StackError> {
|
|
||||||
unimplemented!()
|
|
||||||
}
|
|
||||||
fn peek2(&self) -> Result<u16, StackError> {
|
|
||||||
unimplemented!()
|
|
||||||
}
|
|
||||||
fn pop1(&mut self) -> Result<u8, StackError> {
|
|
||||||
unimplemented!()
|
|
||||||
}
|
|
||||||
fn pop2(&mut self) -> Result<u16, StackError> {
|
|
||||||
unimplemented!()
|
|
||||||
}
|
|
||||||
}
|
|
Loading…
Reference in a new issue