Use generic types

This commit is contained in:
2025-06-19 14:27:19 +08:00
parent 6e45e90878
commit 63286fe5a0
4 changed files with 9 additions and 9 deletions

View File

@@ -51,7 +51,7 @@ struct HuffmanNode {
}
pub struct DscDecoder<'a> {
stream: MsbBitStream<'a>,
stream: MsbBitStream<MemReaderRef<'a>>,
key: u32,
magic: u32,
output_size: u32,

View File

@@ -166,7 +166,7 @@ impl Script for BgiCBG {
}
struct CbgDecoder<'a> {
stream: MsbBitStream<'a>,
stream: MsbBitStream<MemReaderRef<'a>>,
info: &'a BgiCBGHeader,
color_type: CbgColorType,
key: u32,
@@ -568,7 +568,7 @@ impl HuffmanTree {
Self { nodes }
}
fn decode_token(&self, stream: &mut MsbBitStream<'_>) -> Result<usize> {
fn decode_token(&self, stream: &mut MsbBitStream<MemReaderRef<'_>>) -> Result<usize> {
let mut node_index = self.nodes.len() - 1;
loop {
let bit = stream.get_next_bit()?;