Skip to content

Commit

Permalink
use rustversion to avoid an extra feature
Browse files Browse the repository at this point in the history
  • Loading branch information
georgesFoundation committed Nov 20, 2024
1 parent b536e49 commit 11e7e81
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ minicbor = { version = "0.24", features = ["derive"] }
nom = { version = "7", default-features = false }
phf = { version = "0.11", features = ["macros"], default-features = false }
rand_xoshiro = "0.6"
rustversion = "1.0"
secp256k1 = { version = "0.29", default-features = false }
serde = { version = "1.0.156", features = ["derive"], default-features = false }
serde_json = "1"
Expand Down
2 changes: 1 addition & 1 deletion stratum-v1/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ embedded-io-async = { workspace = true }
faster-hex = { version = "0.10", default-features = false }
heapless = { workspace = true, features = ["serde"] }
log = { workspace = true, optional = true }
rustversion = { workspace = true }
serde = { workspace = true }
serde-json-core = { workspace = true, features = ["custom-error-messages"] }

[features]
core-error = [] # bump MSRV to 1.81.0
defmt-03 = [
"dep:defmt",
"embedded-io-async/defmt-03",
Expand Down
4 changes: 2 additions & 2 deletions stratum-v1/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,10 @@ pub enum Error {
HexError(faster_hex::Error),
}

#[cfg(feature = "core-error")]
#[rustversion::since(1.81)]
impl core::error::Error for Error {}

#[cfg(feature = "core-error")]
#[rustversion::since(1.81)]
impl core::fmt::Display for Error {
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
write!(f, "{self:?}")
Expand Down

0 comments on commit 11e7e81

Please sign in to comment.