Skip to content

Commit

Permalink
chore: upgrade bitflags
Browse files Browse the repository at this point in the history
The new bitflags no longer encodes bitflags as "bits" when serializing
to a human readable format, but that's fine for us.
  • Loading branch information
Stebalien committed Jun 28, 2023
1 parent b7f10f6 commit 03eb116
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 6 deletions.
5 changes: 4 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion shared/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ serde = { version = "1", default-features = false }
serde_tuple = "0.5"
arbitrary = { version = "1.1", optional = true, features = ["derive"] }
quickcheck = { version = "1", optional = true }
bitflags = "1.3.2"
bitflags = { version = "2.3.3", features = ["serde"] }

## non-wasm dependencies; these dependencies and the respective code is
## only activated through non-default features, which the Kernel enables, but
Expand Down
4 changes: 2 additions & 2 deletions shared/src/event/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,12 @@ impl From<Vec<Entry>> for ActorEvent {

bitflags! {
/// Flags associated with an Event entry.
#[derive(Deserialize, Serialize)]
#[derive(Deserialize, Serialize, Copy, Clone, Eq, PartialEq, Debug)]
#[serde(transparent)]
pub struct Flags: u64 {
const FLAG_INDEXED_KEY = 0b00000001;
const FLAG_INDEXED_VALUE = 0b00000010;
const FLAG_INDEXED_ALL = Self::FLAG_INDEXED_KEY.bits | Self::FLAG_INDEXED_VALUE.bits;
const FLAG_INDEXED_ALL = Self::FLAG_INDEXED_KEY.bits() | Self::FLAG_INDEXED_VALUE.bits();
}
}

Expand Down
2 changes: 1 addition & 1 deletion shared/src/sys/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ impl<'a> TryFrom<&'a crate::econ::TokenAmount> for TokenAmount {

bitflags! {
/// Flags passed to the send syscall.
#[derive(Default)]
#[derive(Default, Copy, Clone, Eq, PartialEq, Debug)]
#[repr(transparent)]
// note: this is 64 bits because I don't want to hate my past self, not because we need them
// right now. It doesn't really cost anything anyways.
Expand Down
2 changes: 1 addition & 1 deletion shared/src/sys/out.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ pub mod vm {

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

0 comments on commit 03eb116

Please sign in to comment.