diff options
Diffstat (limited to 'evc/src/block.rs')
-rw-r--r-- | evc/src/block.rs | 6 |
1 files changed, 3 insertions, 3 deletions
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::<Small<Vec2>>()?.0, }, x => bail!("corrupt block type ({})", x), }) |