Skip to content

Commit 03eb116

Browse files
committed
chore: upgrade bitflags
The new bitflags no longer encodes bitflags as "bits" when serializing to a human readable format, but that's fine for us.
1 parent b7f10f6 commit 03eb116

File tree

5 files changed

+9
-6
lines changed

5 files changed

+9
-6
lines changed

Cargo.lock

Lines changed: 4 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

shared/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ serde = { version = "1", default-features = false }
2626
serde_tuple = "0.5"
2727
arbitrary = { version = "1.1", optional = true, features = ["derive"] }
2828
quickcheck = { version = "1", optional = true }
29-
bitflags = "1.3.2"
29+
bitflags = { version = "2.3.3", features = ["serde"] }
3030

3131
## non-wasm dependencies; these dependencies and the respective code is
3232
## only activated through non-default features, which the Kernel enables, but

shared/src/event/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,12 @@ impl From<Vec<Entry>> for ActorEvent {
3838

3939
bitflags! {
4040
/// Flags associated with an Event entry.
41-
#[derive(Deserialize, Serialize)]
41+
#[derive(Deserialize, Serialize, Copy, Clone, Eq, PartialEq, Debug)]
4242
#[serde(transparent)]
4343
pub struct Flags: u64 {
4444
const FLAG_INDEXED_KEY = 0b00000001;
4545
const FLAG_INDEXED_VALUE = 0b00000010;
46-
const FLAG_INDEXED_ALL = Self::FLAG_INDEXED_KEY.bits | Self::FLAG_INDEXED_VALUE.bits;
46+
const FLAG_INDEXED_ALL = Self::FLAG_INDEXED_KEY.bits() | Self::FLAG_INDEXED_VALUE.bits();
4747
}
4848
}
4949

shared/src/sys/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ impl<'a> TryFrom<&'a crate::econ::TokenAmount> for TokenAmount {
5151

5252
bitflags! {
5353
/// Flags passed to the send syscall.
54-
#[derive(Default)]
54+
#[derive(Default, Copy, Clone, Eq, PartialEq, Debug)]
5555
#[repr(transparent)]
5656
// note: this is 64 bits because I don't want to hate my past self, not because we need them
5757
// right now. It doesn't really cost anything anyways.

shared/src/sys/out.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ pub mod vm {
6666

6767
bitflags! {
6868
/// Invocation flags pertaining to the currently executing actor.
69-
#[derive(Default)]
69+
#[derive(Default, Copy, Clone, Eq, PartialEq, Debug)]
7070
#[repr(transparent)]
7171
pub struct ContextFlags: u64 {
7272
/// Invocation is in "read-only" mode. Any balance transfers, sends that would create

0 commit comments

Comments
 (0)