aboutsummaryrefslogtreecommitdiff
path: root/evc/src/block.rs
diff options
context:
space:
mode:
Diffstat (limited to 'evc/src/block.rs')
-rw-r--r--evc/src/block.rs20
1 files changed, 2 insertions, 18 deletions
diff --git a/evc/src/block.rs b/evc/src/block.rs
index 29dd4ba..8d98d55 100644
--- a/evc/src/block.rs
+++ b/evc/src/block.rs
@@ -1,11 +1,5 @@
-use crate::ser::{Ser, Sink, Source};
+use crate::{ser::{Ser, Sink, Source}, pixel::Pixel};
-#[derive(Copy, Clone, Debug)]
-pub struct Pixel {
- pub r: u8,
- pub g: u8,
- pub b: u8,
-}
#[derive(Clone, Debug)]
pub struct Block {
@@ -56,14 +50,4 @@ impl Block {
Ok(Self { size, inner })
}
-}
-impl Ser for Pixel {
- fn write(&self, sink: &mut impl std::io::Write) -> std::io::Result<()> {
- sink.put((self.r, self.g, self.b))
- }
-
- fn read(source: &mut impl std::io::Read) -> std::io::Result<Self> {
- let (r, g, b) = source.get()?;
- Ok(Self { r, g, b })
- }
-}
+} \ No newline at end of file