From 9f838842665ed75d8fda65146a8a1268b62160ee Mon Sep 17 00:00:00 2001 From: Kostya Shishkov Date: Sat, 22 May 2021 12:22:38 +0200 Subject: [PATCH] deflate: make Deflate Send-able --- nihav-core/src/compr/deflate.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) 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, -- 2.39.5