diff options
Diffstat (limited to 'evc/src/block.rs')
-rw-r--r-- | evc/src/block.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/evc/src/block.rs b/evc/src/block.rs index 929793d..dd23207 100644 --- a/evc/src/block.rs +++ b/evc/src/block.rs @@ -3,14 +3,14 @@ use anyhow::bail; use crate::{ pixel::Pixel, ser::{Ser, Sink, Source}, - vec2::{Small, Vec2}, + helpers::vector::{Small, Vec2}, }; #[derive(Clone, Debug)] pub enum Block { Literal(Vec<Pixel>), Split(Box<[Block; 2]>), - Reference { translation: Vec2 }, + Reference { translation: Vec2<isize> }, } impl Block { @@ -33,7 +33,7 @@ impl Block { Ok(()) } - pub fn read(source: &mut impl std::io::Read, size: Vec2) -> anyhow::Result<Self> { + pub fn read(source: &mut impl std::io::Read, size: Vec2<isize>) -> anyhow::Result<Self> { Ok(match source.get::<u8>()? { 0 => Block::Literal(source.get()?), 1 => Block::Split(Box::new({ @@ -54,7 +54,7 @@ impl Block { [a, b] })), 2 => Block::Reference { - translation: source.get::<Small<Vec2>>()?.0, + translation: source.get::<Small<Vec2<isize>>>()?.0, }, x => bail!("corrupt block type ({})", x), }) |