Skip to content

Commit 319cdc1

Browse files
committed
fix: incorrect strum version, upgrade
1 parent bdf23fc commit 319cdc1

File tree

3 files changed

+21
-48
lines changed

3 files changed

+21
-48
lines changed

Cargo.lock

Lines changed: 5 additions & 41 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

program/rust/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ num-derive = "0.3"
1616
num-traits = "0.2"
1717
byteorder = "1.4.3"
1818
serde = { version = "1.0", features = ["derive"], optional = true }
19-
strum = { version = "0.21.0", features = ["derive"], optional = true }
19+
strum = { version = "0.24.1", features = ["derive"], optional = true }
2020

2121
[dev-dependencies]
2222
solana-program-test = "=1.13.3"

program/rust/src/accounts/price.rs

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -231,13 +231,22 @@ impl PythAccount for PriceAccountV2 {
231231
232232
#[derive(Debug, Copy, Clone, PartialEq)]
233233
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
234-
#[cfg_attr(feature = "strum", derive(strum::EnumDiscriminants))]
235-
#[cfg_attr(feature = "strum", strum_discriminants(derive(strum::EnumIter, Hash)))]
236-
#[cfg_attr(feature = "strum", strum_discriminants(name(MessageType)))]
237-
#[cfg_attr(feature = "strum", strum_discriminants(vis(pub)))]
238234
#[cfg_attr(
239-
all(feature = "strum", feature = "serde"),
240-
strum_discriminants(derive(serde::Serialize, serde::Deserialize))
235+
feature = "strum",
236+
derive(strum::EnumDiscriminants),
237+
strum_discriminants(name(MessageType)),
238+
strum_discriminants(vis(pub)),
239+
strum_discriminants(derive(
240+
Hash,
241+
strum::EnumIter,
242+
strum::EnumString,
243+
strum::IntoStaticStr,
244+
strum::ToString,
245+
)),
246+
cfg_attr(
247+
feature = "serde",
248+
strum_discriminants(derive(serde::Serialize, serde::Deserialize))
249+
)
241250
)]
242251
pub enum Message {
243252
PriceFeedMessage(PriceFeedMessage),

0 commit comments

Comments
 (0)