From 6cffb78b8866b45df3b4516c009ff306fce23a92 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 6 Apr 2023 20:57:15 +0000 Subject: [PATCH 1/2] Update bitflags requirement from 1.2 to 2.1 Updates the requirements on [bitflags](https://github.com/bitflags/bitflags) to permit the latest version. - [Release notes](https://github.com/bitflags/bitflags/releases) - [Changelog](https://github.com/bitflags/bitflags/blob/main/CHANGELOG.md) - [Commits](https://github.com/bitflags/bitflags/compare/1.2.0...2.1.0) --- updated-dependencies: - dependency-name: bitflags dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- mla/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mla/Cargo.toml b/mla/Cargo.toml index b2097db..aa3916a 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} byteorder = { version = "1.3", default-features = false, features = ["std"] } serde = { version = "1", default-features = false, features = ["derive"] } bincode = { version = "1.3", default-features = false} From 99d0eeceae1c311bf20cf95391ccbcf358588526 Mon Sep 17 00:00:00 2001 From: Camille Mougey Date: Mon, 24 Apr 2023 10:45:55 +0200 Subject: [PATCH 2/2] bitflags: update to API 2.x --- mla/Cargo.toml | 2 +- mla/src/lib.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/mla/Cargo.toml b/mla/Cargo.toml index aa3916a..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 = "2.1", 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;