From 70514416c2ade2abe628efbd0a629a66febdeb13 Mon Sep 17 00:00:00 2001 From: metamuffin Date: Tue, 6 Dec 2022 19:30:03 +0100 Subject: minor stuff, store translation as i8 --- evc/src/block.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'evc/src/block.rs') diff --git a/evc/src/block.rs b/evc/src/block.rs index 024adb6..929793d 100644 --- a/evc/src/block.rs +++ b/evc/src/block.rs @@ -3,7 +3,7 @@ use anyhow::bail; use crate::{ pixel::Pixel, ser::{Ser, Sink, Source}, - vec2::Vec2, + vec2::{Small, Vec2}, }; #[derive(Clone, Debug)] @@ -27,7 +27,7 @@ impl Block { } Block::Reference { translation } => { sink.put(2u8)?; - sink.put(*translation)?; + sink.put(Small(*translation))?; } } Ok(()) @@ -54,7 +54,7 @@ impl Block { [a, b] })), 2 => Block::Reference { - translation: source.get()?, + translation: source.get::>()?.0, }, x => bail!("corrupt block type ({})", x), }) -- cgit v1.2.3-70-g09d2