From 290961ed55093cd0789dec731ad4878d543f62c4 Mon Sep 17 00:00:00 2001 From: KodrAus Date: Tue, 27 Jun 2023 14:21:44 +1000 Subject: [PATCH] prepare for 2.3.3 release --- CHANGELOG.md | 27 +++++++++++++++++++++++++++ Cargo.toml | 2 +- README.md | 2 +- src/lib.rs | 2 +- 4 files changed, 30 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5512cebf..cbeabac2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,30 @@ +# 2.3.3 + +## Changes to `-=` + +The `-=` operator was incorrectly changed to truncate bits that didn't correspond to valid flags in `2.3.0`. This has +been fixed up so it once again behaves the same as `-` and `difference`. + +## Changes to `!` + +The `!` operator previously called `Self::from_bits_truncate`, which would truncate any bits that only partially +overlapped with a valid flag. It will now use `bits & Self::all().bits()`, so any bits that overlap any bits +specified by any flag will be respected. This is unlikely to have any practical implications, but enables defining +a flag like `const ALL = !0` as a way to signal that any bit pattern is a known set of flags. + +## Changes to formatting + +Zero-valued flags will never be printed. You'll either get `0x0` for empty flags using debug formatting, or the +set of flags with zero-valued flags omitted for others. + +Composite flags will no longer be redundantly printed if there are extra bits to print at the end that don't correspond +to a valid flag. + +## What's Changed +* Fix up incorrect sub assign behavior and other cleanups by @KodrAus in https://github.com/bitflags/bitflags/pull/366 + +**Full Changelog**: https://github.com/bitflags/bitflags/compare/2.3.2...2.3.3 + # 2.3.2 ## What's Changed diff --git a/Cargo.toml b/Cargo.toml index 7d578821..a118089d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -3,7 +3,7 @@ name = "bitflags" # NB: When modifying, also modify: # 1. html_root_url in lib.rs # 2. number in readme (for breaking changes) -version = "2.3.2" +version = "2.3.3" edition = "2021" rust-version = "1.56.0" authors = ["The Rust Project Developers"] diff --git a/README.md b/README.md index fada7a6c..d604d48d 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ Add this to your `Cargo.toml`: ```toml [dependencies] -bitflags = "2.3.2" +bitflags = "2.3.3" ``` and this to your source code: diff --git a/src/lib.rs b/src/lib.rs index c9ed1c28..bac1d196 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -423,7 +423,7 @@ #![cfg_attr(not(any(feature = "std", test)), no_std)] #![cfg_attr(not(test), forbid(unsafe_code))] #![cfg_attr(test, allow(mixed_script_confusables))] -#![doc(html_root_url = "https://docs.rs/bitflags/2.3.2")] +#![doc(html_root_url = "https://docs.rs/bitflags/2.3.3")] #[doc(inline)] pub use traits::{Bits, Flag, Flags};