From: Kostya Shishkov Date: Sat, 22 May 2021 10:22:38 +0000 (+0200) Subject: deflate: make Deflate Send-able X-Git-Url: https://git.nihav.org/?a=commitdiff_plain;h=9f838842665ed75d8fda65146a8a1268b62160ee;p=nihav.git deflate: make Deflate Send-able --- diff --git a/nihav-core/src/compr/deflate.rs b/nihav-core/src/compr/deflate.rs index d7c5886..3a3819e 100644 --- a/nihav-core/src/compr/deflate.rs +++ b/nihav-core/src/compr/deflate.rs @@ -1739,17 +1739,17 @@ pub struct Deflate { sum1: u32, sum2: u32, zlib_mode: bool, - parser: Box, + parser: Box, } impl Deflate { ///! Creates a new instance of `Deflate`. pub fn new(mode: DeflateMode) -> Self { let (mode, parser) = match mode { - DeflateMode::NoCompr => (Mode::Copy, Box::new(NoParser{}) as Box), - DeflateMode::Fast => (Mode::Fixed, Box::new(GreedyParser{}) as Box), - DeflateMode::Better => (Mode::Dynamic, Box::new(LazyParser{}) as Box), - DeflateMode::Best => (Mode::Dynamic, Box::new(OptimalParser::new()) as Box), + DeflateMode::NoCompr => (Mode::Copy, Box::new(NoParser{}) as Box), + DeflateMode::Fast => (Mode::Fixed, Box::new(GreedyParser{}) as Box), + DeflateMode::Better => (Mode::Dynamic, Box::new(LazyParser{}) as Box), + DeflateMode::Best => (Mode::Dynamic, Box::new(OptimalParser::new()) as Box), }; Self { mode, parser,