chore: slight clean up

This commit is contained in:
rvcas
2022-05-30 18:05:50 -04:00
parent 83a784c745
commit 3f1ddef635
6 changed files with 4 additions and 1 deletions

View File

@@ -7,6 +7,7 @@ pub trait Decode<'b>: Sized {
impl Decode<'_> for Filler {
fn decode(d: &mut Decoder) -> Result<Filler, String> {
d.filler()?;
Ok(Filler::FillerEnd)
}
}

View File

@@ -79,6 +79,7 @@ impl Encode for &[u8] {
impl<T: Encode> Encode for Box<T> {
fn encode(&self, e: &mut Encoder) -> Result<(), String> {
self.as_ref().encode(e)?;
Ok(())
}
}

View File

@@ -34,7 +34,6 @@ pub enum Term {
#[derive(Debug, Clone, PartialEq)]
pub enum Constant {
// TODO: figure out the right size for this
// tag: 0
Integer(isize),
// tag: 1

View File

@@ -261,6 +261,7 @@ mod test {
let flat_encoded = vec![
0b00001011, 0b00010110, 0b00100001, 0b01001000, 0b00000101, 0b10000001,
];
let expected_program = Program {
version: (11, 22, 33),
term: Term::Constant(Constant::Integer(11)),