From 8284ac18ccaed9e69b8f09cf09d31fdcabdf54c2 Mon Sep 17 00:00:00 2001 From: GrayJack Date: Thu, 16 Jan 2025 18:20:12 -0300 Subject: [PATCH] chore: bump version --- Cargo.lock | 4 ++-- Cargo.toml | 4 ++-- bitflags-attr-macros/Cargo.toml | 2 +- src/lib.rs | 4 ++++ 4 files changed, 9 insertions(+), 5 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 50056413..b69b161f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4,7 +4,7 @@ version = 3 [[package]] name = "bitflag-attr" -version = "0.8.2" +version = "0.9.0" dependencies = [ "bitflags-attr-macros", "serde", @@ -13,7 +13,7 @@ dependencies = [ [[package]] name = "bitflags-attr-macros" -version = "0.8.2" +version = "0.9.0" dependencies = [ "proc-macro2", "quote", diff --git a/Cargo.toml b/Cargo.toml index 582220f9..0acce422 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "bitflag-attr" authors = ["GrayJack "] -version = "0.8.2" +version = "0.9.0" edition = "2021" license = "MIT OR Apache-2.0" description = "A macro to generate bitflags structures from C-like enums" @@ -13,7 +13,7 @@ rust-version = "1.75.0" exclude = ["/tests", "/.github"] [dependencies] -bitflags-attr-macros = { version = "=0.8.2", path = "bitflags-attr-macros" } +bitflags-attr-macros = { version = "=0.9.0", path = "bitflags-attr-macros" } [[test]] name = "tests" diff --git a/bitflags-attr-macros/Cargo.toml b/bitflags-attr-macros/Cargo.toml index 7e21a5b4..a1e8f687 100644 --- a/bitflags-attr-macros/Cargo.toml +++ b/bitflags-attr-macros/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "bitflags-attr-macros" -version = "0.8.2" +version = "0.9.0" edition = "2021" license = "MIT OR Apache-2.0" keywords = ["bit", "bitmask", "bitflags", "flags"] diff --git a/src/lib.rs b/src/lib.rs index b35c99a9..3e02a005 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -616,6 +616,10 @@ pub trait Flags: Sized + Copy + 'static { } } +/////////////////////////////////////////////////////////////////////////////// +// Adapted from bitflags `bitflags_match!` +/////////////////////////////////////////////////////////////////////////////// + /// A macro that matches flags values, similar to Rust's `match` statement. /// /// In a regular `match` statement, the syntax `Flag::A | Flag::B` is interpreted as an or-pattern,