Ugh
This commit is contained in:
@@ -3,7 +3,7 @@ use std::io;
|
||||
use std::io::{Read, Write};
|
||||
use std::path::PathBuf;
|
||||
use strum::IntoEnumIterator;
|
||||
use strum::{Display, EnumString, EnumIter};
|
||||
use strum::{Display, EnumIter, EnumString};
|
||||
|
||||
use log::*;
|
||||
|
||||
@@ -203,7 +203,9 @@ lazy_static! {
|
||||
|
||||
#[cfg(feature = "gzip")]
|
||||
{
|
||||
em[CompressionType::GZip] = Box::new(crate::compression_engine::gzip::CompressionEngineGZip::new()) as Box<dyn CompressionEngine>;
|
||||
em[CompressionType::GZip] =
|
||||
Box::new(crate::compression_engine::gzip::CompressionEngineGZip::new())
|
||||
as Box<dyn CompressionEngine>;
|
||||
}
|
||||
|
||||
em
|
||||
@@ -219,6 +221,9 @@ pub fn get_compression_engine(ct: CompressionType) -> Result<Box<dyn Compression
|
||||
if engine.is_supported() {
|
||||
Ok(engine.clone())
|
||||
} else {
|
||||
Err(anyhow!("Compression engine for {} is not supported", ct.to_string()))
|
||||
Err(anyhow!(
|
||||
"Compression engine for {} is not supported",
|
||||
ct.to_string()
|
||||
))
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user