Replace failure with thiserror (#654)

* updated util and libwallet with thiserror

* update impl crate to thiserror

* api crate converted to thiserror

* update of controller crate to thiserror

* update final bin + tests to thiserror

* update unused import

* remove failure derive

* reset import of grin to master

* update cargo lock

* update from master
This commit is contained in:
Yeastplume
2022-07-28 10:21:45 +01:00
committed by GitHub
parent 67f0e2b0e0
commit 64cab53b1b
63 changed files with 1066 additions and 1586 deletions
+1
View File
@@ -16,6 +16,7 @@ serde_derive = "1"
ed25519-dalek = "1.0.0-pre.4"
data-encoding = "2"
sha3 = "0.8"
thiserror = "1"
# For Release
#grin_core = "4.0.0"
+3 -1
View File
@@ -20,12 +20,14 @@ use sha3::{Digest, Sha3_256};
use std::convert::TryFrom;
use std::fmt;
#[derive(Debug, Clone, Eq, PartialEq, Serialize, Deserialize)]
#[derive(Debug, Clone, Eq, PartialEq, thiserror::Error, Serialize, Deserialize)]
/// OnionV3 Address Errors
pub enum OnionV3Error {
/// Error decoding an address from a string
#[error("Address Decoding: {0}")]
AddressDecoding(String),
/// Error with given private key
#[error("Invalid Private Key: {0}")]
InvalidPrivateKey(String),
}