Skip to content

Commit

Permalink
Fix warnings revealed by CI. (Candidate v1.1.4 release)
Browse files Browse the repository at this point in the history
  • Loading branch information
Lymia committed Jul 22, 2024
1 parent 3921582 commit a24b0f6
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ jobs:
- uses: actions-rs/cargo@v1
with:
command: test
args: -p enumset --all-features
args: -p enumset --features serde,alloc,proc-crate-macro

test_trybuild:
runs-on: ubuntu-latest
Expand Down
9 changes: 4 additions & 5 deletions RELEASES.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
# Version 1.1.4 (2024-07-22)
* `EnumSet::<T>::empty()`, `EnumSet::<T>::all()`, `EnumSet::<T>::bit_width()`,
and `EnumSet::<T>::variant_count()` are now usable in const contexts.
* The `EnumSet::<T>::EMPTY` and `EnumSet::<T>::ALL` consts are deprecated in
favor of the newly const `EnumSet::<T>::empty()` and `EnumSet::<T>::all()`
functions.
* The `empty`, `all`, `bit_width`, and `variant_count` functions of
`EnumSet<T>` are now const.
* The `EMPTY` and `ALL` consts of `EnumSet<T>` are deprecated in favor of the
`empty` and `all` functions.
* The `std` feature flag has been deprecated in favor of the new
`const-proc-macro` feature flag. The feature flag was never used for any
`std`-specific functionality beyond that crate.
Expand Down
2 changes: 1 addition & 1 deletion enumset/src/macros.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ pub mod __internal {
#[macro_export]
macro_rules! enum_set {
($(|)*) => {
EnumSet::EMPTY
EnumSet::empty()
};
($value:path $(|)*) => {
{
Expand Down
1 change: 1 addition & 0 deletions enumset/src/set.rs
Original file line number Diff line number Diff line change
Expand Up @@ -409,6 +409,7 @@ impl<T: EnumSetType> Hash for EnumSet<T> {
self.__priv_repr.hash(state)
}
}
#[allow(clippy::non_canonical_partial_ord_impl)]
impl<T: EnumSetType> PartialOrd for EnumSet<T> {
fn partial_cmp(&self, other: &Self) -> Option<Ordering> {
self.__priv_repr.partial_cmp(&other.__priv_repr)
Expand Down
2 changes: 2 additions & 0 deletions enumset/tests/conversions.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#![deny(warnings)]

use enumset::*;

macro_rules! read_slice {
Expand Down
1 change: 1 addition & 0 deletions enumset/tests/ops.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#![allow(dead_code)]
#![deny(warnings)]

use enumset::*;
use std::collections::{HashSet, BTreeSet};
Expand Down
2 changes: 2 additions & 0 deletions enumset/tests/repr.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#![deny(warnings)]

use enumset::*;

#[derive(EnumSetType, Debug)]
Expand Down
1 change: 1 addition & 0 deletions enumset/tests/serde.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#![cfg(feature = "serde")]
#![deny(warnings)]
#![allow(dead_code)]

use enumset::*;
Expand Down

0 comments on commit a24b0f6

Please sign in to comment.