diff --git a/src/block/mod.rs b/src/block/mod.rs index 003dd45cd..7f64db808 100644 --- a/src/block/mod.rs +++ b/src/block/mod.rs @@ -23,17 +23,22 @@ use super::liblz4::*; use std::io::{Error, ErrorKind, Result}; /// Represents the compression mode do be used. -#[derive(Default, Clone, Copy, Debug)] +#[derive(Clone, Copy, Debug)] pub enum CompressionMode { /// High compression with compression parameter HIGHCOMPRESSION(i32), /// Fast compression with acceleration paramet FAST(i32), /// Default compression - #[default] DEFAULT, } +impl Default for CompressionMode { + fn default() -> Self { + CompressionMode::DEFAULT + } +} + /// Returns the size of the buffer that is guaranteed to hold the result of /// compressing `uncompressed_size` bytes of in data. Returns std::io::Error /// with ErrorKind::InvalidInput if input data is too long to be compressed by lz4.