From 5002d0df81f74418665e4e99179ba56d8e78cbe1 Mon Sep 17 00:00:00 2001 From: metamuffin Date: Tue, 6 Dec 2022 08:16:09 +0100 Subject: more codde --- evc/src/block.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'evc/src/block.rs') diff --git a/evc/src/block.rs b/evc/src/block.rs index 261882a..f58bcb3 100644 --- a/evc/src/block.rs +++ b/evc/src/block.rs @@ -17,7 +17,7 @@ pub enum BlockInner { } impl Block { - pub fn write(&self, sink: &mut impl std::io::Write) -> std::io::Result<()> { + pub fn write(&self, sink: &mut impl std::io::Write) -> anyhow::Result<()> { match &self.inner { BlockInner::Literal(pixels) => { sink.put(0u8)?; @@ -35,7 +35,7 @@ impl Block { Ok(()) } - pub fn read(source: &mut impl std::io::Read, size: (usize, usize)) -> std::io::Result { + pub fn read(source: &mut impl std::io::Read, size: (usize, usize)) -> anyhow::Result { let inner = match source.get::()? { 0 => BlockInner::Literal(source.get()?), 1 => BlockInner::Split(Box::new({ -- cgit v1.2.3-70-g09d2