diff --git a/Cargo.lock b/Cargo.lock index f51b55da57f4..437b22bd950c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3941,7 +3941,7 @@ source = "git+https://github.com/mozilla/application-services?rev=1a59041d0c7d36 name = "nsstring" version = "0.1.0" dependencies = [ - "bitflags 1.999.999", + "bitflags 2.4.0", "encoding_rs", ] diff --git a/xpcom/rust/nsstring/Cargo.toml b/xpcom/rust/nsstring/Cargo.toml index c2f8e34b457b..7d4b3e545640 100644 --- a/xpcom/rust/nsstring/Cargo.toml +++ b/xpcom/rust/nsstring/Cargo.toml @@ -10,5 +10,5 @@ edition = "2018" gecko_debug = [] [dependencies] -bitflags = "1.0" +bitflags = "2" encoding_rs = "0.8.0" diff --git a/xpcom/rust/nsstring/src/lib.rs b/xpcom/rust/nsstring/src/lib.rs index 521c2c8c04fe..64d50df8fe91 100644 --- a/xpcom/rust/nsstring/src/lib.rs +++ b/xpcom/rust/nsstring/src/lib.rs @@ -157,6 +157,7 @@ bitflags! { // While this has the same layout as u16, it cannot be passed // over FFI safely as a u16. #[repr(C)] + #[derive(Debug, Copy, PartialEq, Eq, Clone, PartialOrd, Ord, Hash)] struct DataFlags: u16 { const TERMINATED = 1 << 0; // IsTerminated returns true const VOIDED = 1 << 1; // IsVoid returns true @@ -172,6 +173,7 @@ bitflags! { // While this has the same layout as u16, it cannot be passed // over FFI safely as a u16. #[repr(C)] + #[derive(Debug, Copy, PartialEq, Eq, Clone, PartialOrd, Ord, Hash)] struct ClassFlags: u16 { const INLINE = 1 << 0; // |this|'s buffer is inline const NULL_TERMINATED = 1 << 1; // |this| requires its buffer is null-terminated