From 91f5ad848e8c89177c41e9ac8dc3d3125a1acdd7 Mon Sep 17 00:00:00 2001 From: Kostya Shishkov Date: Thu, 13 Feb 2020 19:20:26 +0100 Subject: [PATCH] core/io: make bitstream reader clone()able --- nihav-core/src/io/bitreader.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/nihav-core/src/io/bitreader.rs b/nihav-core/src/io/bitreader.rs index 1163326..26b95a6 100644 --- a/nihav-core/src/io/bitreader.rs +++ b/nihav-core/src/io/bitreader.rs @@ -35,7 +35,7 @@ /// Bitstream reading modes. -#[derive(Debug)] +#[derive(Debug,Clone,Copy)] pub enum BitReaderMode { /// The stream is big endian MSB first. BE, @@ -48,7 +48,7 @@ pub enum BitReaderMode { } /// A list specifying general bitstream reading errors. -#[derive(Debug)] +#[derive(Debug,Clone,Copy)] pub enum BitReaderError { /// The reader is at the end of bitstream. BitstreamEnd, @@ -64,7 +64,7 @@ use self::BitReaderError::*; pub type BitReaderResult = Result; /// Bitstream reader. -#[derive(Debug)] +#[derive(Debug,Clone)] pub struct BitReader<'a> { cache: u64, bits: u8, -- 2.30.2