Skip to content

Commit

Permalink
Merge pull request #367 from KodrAus/cargo/2.3.3
Browse files Browse the repository at this point in the history
Prepare for 2.3.3 release
  • Loading branch information
KodrAus committed Jun 27, 2023
2 parents 3ac85e2 + 290961e commit 6ed2e8d
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 3 deletions.
27 changes: 27 additions & 0 deletions 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
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Expand Up @@ -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"]
Expand Down
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion src/lib.rs
Expand Up @@ -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};
Expand Down

0 comments on commit 6ed2e8d

Please sign in to comment.