Skip to content

Commit

Permalink
chore: Update bitflags, derive traits
Browse files Browse the repository at this point in the history
bitflags v2 stopped deriving a bunch of traits by default
  • Loading branch information
qdot committed Sep 1, 2023
1 parent 62f9d20 commit 954f44f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ serde = ["uuid/serde", "serde_cr", "serde_bytes"]
[dependencies]
async-trait = "0.1.73"
log = "0.4.20"
bitflags = "1.3.2"
bitflags = "2.4.0"
thiserror = "1.0.47"
uuid = "1.4.1"
serde_cr = { package = "serde", version = "1.0.188", features = ["derive"], default-features = false, optional = true }
Expand Down
9 changes: 3 additions & 6 deletions src/api/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,11 @@ pub struct ValueNotification {
pub value: Vec<u8>,
}



bitflags! {
/// A set of properties that indicate what operations are supported by a Characteristic.
#[derive(Default, Debug, PartialEq, Eq, Ord, PartialOrd, Clone, Copy)]
pub struct CharPropFlags: u8 {
const BROADCAST = 0x01;
const READ = 0x02;
Expand All @@ -108,12 +111,6 @@ bitflags! {
}
}

impl Default for CharPropFlags {
fn default() -> Self {
Self { bits: 0 }
}
}

/// A GATT service. Services are groups of characteristics, which may be standard or
/// device-specific.
#[derive(Debug, Ord, PartialOrd, Eq, PartialEq, Clone)]
Expand Down

0 comments on commit 954f44f

Please sign in to comment.