forked from mirrors/gecko-dev
Bug 1855614 - Upgrade nsstring to bitflags 2. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D189450
This commit is contained in:
parent
fbd0c1d69f
commit
82c1dd3157
3 changed files with 4 additions and 2 deletions
2
Cargo.lock
generated
2
Cargo.lock
generated
|
|
@ -3941,7 +3941,7 @@ source = "git+https://github.com/mozilla/application-services?rev=1a59041d0c7d36
|
||||||
name = "nsstring"
|
name = "nsstring"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bitflags 1.999.999",
|
"bitflags 2.4.0",
|
||||||
"encoding_rs",
|
"encoding_rs",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -10,5 +10,5 @@ edition = "2018"
|
||||||
gecko_debug = []
|
gecko_debug = []
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
bitflags = "1.0"
|
bitflags = "2"
|
||||||
encoding_rs = "0.8.0"
|
encoding_rs = "0.8.0"
|
||||||
|
|
|
||||||
|
|
@ -157,6 +157,7 @@ bitflags! {
|
||||||
// While this has the same layout as u16, it cannot be passed
|
// While this has the same layout as u16, it cannot be passed
|
||||||
// over FFI safely as a u16.
|
// over FFI safely as a u16.
|
||||||
#[repr(C)]
|
#[repr(C)]
|
||||||
|
#[derive(Debug, Copy, PartialEq, Eq, Clone, PartialOrd, Ord, Hash)]
|
||||||
struct DataFlags: u16 {
|
struct DataFlags: u16 {
|
||||||
const TERMINATED = 1 << 0; // IsTerminated returns true
|
const TERMINATED = 1 << 0; // IsTerminated returns true
|
||||||
const VOIDED = 1 << 1; // IsVoid 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
|
// While this has the same layout as u16, it cannot be passed
|
||||||
// over FFI safely as a u16.
|
// over FFI safely as a u16.
|
||||||
#[repr(C)]
|
#[repr(C)]
|
||||||
|
#[derive(Debug, Copy, PartialEq, Eq, Clone, PartialOrd, Ord, Hash)]
|
||||||
struct ClassFlags: u16 {
|
struct ClassFlags: u16 {
|
||||||
const INLINE = 1 << 0; // |this|'s buffer is inline
|
const INLINE = 1 << 0; // |this|'s buffer is inline
|
||||||
const NULL_TERMINATED = 1 << 1; // |this| requires its buffer is null-terminated
|
const NULL_TERMINATED = 1 << 1; // |this| requires its buffer is null-terminated
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue