Skip to content

Commit b830872

Browse files
author
Ed Page
committed
chore: Update enumflags2
1 parent 7c80368 commit b830872

File tree

4 files changed

+43
-43
lines changed

4 files changed

+43
-43
lines changed

Cargo.lock

+38-38
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

crates/varcon-core/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ flags = ["enumflags2"]
2020

2121
[dependencies]
2222
nom = { version = "6", optional = true }
23-
enumflags2 = { version = "0.6", optional = true }
23+
enumflags2 = { version = "0.7", optional = true }
2424

2525
[package.metadata.docs.rs]
2626
features = [ "parser", "flags" ]

crates/varcon-core/src/lib.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,8 @@ pub struct Type {
8383
pub num: Option<usize>,
8484
}
8585

86+
#[cfg_attr(feature = "flags", enumflags2::bitflags)]
8687
#[derive(Copy, Clone, PartialEq, Eq, Hash, Debug)]
87-
#[cfg_attr(feature = "flags", derive(enumflags2::BitFlags))]
8888
#[repr(u8)]
8989
pub enum Category {
9090
American = 0x01,
@@ -98,8 +98,8 @@ pub enum Category {
9898
#[cfg(feature = "flags")]
9999
pub type CategorySet = enumflags2::BitFlags<Category>;
100100

101+
#[cfg_attr(feature = "flags", enumflags2::bitflags)]
101102
#[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash, Debug)]
102-
#[cfg_attr(feature = "flags", derive(enumflags2::BitFlags))]
103103
#[repr(u8)]
104104
pub enum Tag {
105105
Eq = 0x01,
@@ -112,8 +112,8 @@ pub enum Tag {
112112
#[cfg(feature = "flags")]
113113
pub type TagSet = enumflags2::BitFlags<Tag>;
114114

115+
#[cfg_attr(feature = "flags", enumflags2::bitflags)]
115116
#[derive(Copy, Clone, PartialEq, Eq, Hash, Debug)]
116-
#[cfg_attr(feature = "flags", derive(enumflags2::BitFlags))]
117117
#[repr(u8)]
118118
pub enum Pos {
119119
Noun = 0x01,

src/dict.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ impl BuiltIn {
8484
let var = vars[0];
8585
let var_categories = unsafe {
8686
// Code-genned from a checked category-set, so known to be safe
87-
typos_vars::CategorySet::new(var.0)
87+
typos_vars::CategorySet::from_bits_unchecked(var.0)
8888
};
8989
if let Some(locale) = self.locale {
9090
if var_categories.contains(locale) {

0 commit comments

Comments
 (0)