diff --git a/mla/Cargo.toml b/mla/Cargo.toml index b2097db..86a6087 100644 --- a/mla/Cargo.toml +++ b/mla/Cargo.toml @@ -15,7 +15,7 @@ readme = "../README.md" rand = { version = "0.8", default-features = false, features = ["getrandom", "std"]} rand_chacha = { version = "0.3", default-features = false} brotli = { version = "3.3", default-features = false, features = ["std"]} -bitflags = { version = "1.2", default-features = false} +bitflags = { version = "2.1", default-features = false, features = ["serde"]} byteorder = { version = "1.3", default-features = false, features = ["std"] } serde = { version = "1", default-features = false, features = ["derive"] } bincode = { version = "1.3", default-features = false} diff --git a/mla/src/lib.rs b/mla/src/lib.rs index b4d8873..748e743 100644 --- a/mla/src/lib.rs +++ b/mla/src/lib.rs @@ -54,12 +54,12 @@ bitflags! { /// [Encryption (ENCRYPT)] /// [Raw File I/O] /// ``` - #[derive(Serialize, Deserialize)] + #[derive(Debug, Clone, Copy, PartialEq, Serialize, Deserialize)] pub struct Layers: u8 { const ENCRYPT = 0b0000_0001; const COMPRESS = 0b0000_0010; /// Recommended layering - const DEFAULT = Self::ENCRYPT.bits | Self::COMPRESS.bits; + const DEFAULT = Self::ENCRYPT.bits() | Self::COMPRESS.bits(); /// No additional layer (ie, for debugging purpose) const DEBUG = 0; const EMPTY = 0;