mirror of
https://github.com/serai-dex/serai.git
synced 2025-12-09 20:59:23 +00:00
thiserror 2.0, cargo update
This commit is contained in:
@@ -18,7 +18,7 @@ workspace = true
|
||||
[dependencies]
|
||||
std-shims = { path = "../../../../common/std-shims", version = "^0.1.1", default-features = false }
|
||||
|
||||
thiserror = { version = "1", default-features = false, optional = true }
|
||||
thiserror = { version = "2", default-features = false }
|
||||
|
||||
zeroize = { version = "^1.5", default-features = false, features = ["zeroize_derive"] }
|
||||
rand_core = { version = "0.6", default-features = false }
|
||||
@@ -36,7 +36,7 @@ curve25519-dalek = { version = "4", default-features = false, features = ["alloc
|
||||
std = [
|
||||
"std-shims/std",
|
||||
|
||||
"thiserror",
|
||||
"thiserror/std",
|
||||
|
||||
"zeroize/std",
|
||||
"rand_core/std",
|
||||
|
||||
@@ -11,20 +11,19 @@ use original::{SeedError as OriginalSeedError, Seed as OriginalSeed};
|
||||
use polyseed::{PolyseedError, Polyseed};
|
||||
|
||||
/// An error from working with seeds.
|
||||
#[derive(Clone, Copy, PartialEq, Eq, Debug)]
|
||||
#[cfg_attr(feature = "std", derive(thiserror::Error))]
|
||||
#[derive(Clone, Copy, PartialEq, Eq, Debug, thiserror::Error)]
|
||||
pub enum SeedError {
|
||||
/// The seed was invalid.
|
||||
#[cfg_attr(feature = "std", error("invalid seed"))]
|
||||
#[error("invalid seed")]
|
||||
InvalidSeed,
|
||||
/// The entropy was invalid.
|
||||
#[cfg_attr(feature = "std", error("invalid entropy"))]
|
||||
#[error("invalid entropy")]
|
||||
InvalidEntropy,
|
||||
/// The checksum did not match the data.
|
||||
#[cfg_attr(feature = "std", error("invalid checksum"))]
|
||||
#[error("invalid checksum")]
|
||||
InvalidChecksum,
|
||||
/// Unsupported features were enabled.
|
||||
#[cfg_attr(feature = "std", error("unsupported features"))]
|
||||
#[error("unsupported features")]
|
||||
UnsupportedFeatures,
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user