1
1
#[ cfg( feature = "std" ) ]
2
- use std:: { fmt:: { Debug , Display , Formatter , Result as FmtResult } , string:: String } ;
2
+ use std:: {
3
+ fmt:: { Debug , Display , Formatter , Result as FmtResult } ,
4
+ string:: String ,
5
+ } ;
3
6
4
7
#[ cfg( not( feature = "std" ) ) ]
5
8
use alloc:: string:: String ;
@@ -33,7 +36,9 @@ impl Error {
33
36
fn error_text ( & self ) -> String {
34
37
match self {
35
38
Error :: Base58Checksum => String :: from ( "Base58 checksum mismatch" ) ,
36
- Error :: Base58Decoding ( from_base58_error) => format ! ( "Base58 decoding error: {:?}" , from_base58_error) ,
39
+ Error :: Base58Decoding ( from_base58_error) => {
40
+ format ! ( "Base58 decoding error: {:?}" , from_base58_error)
41
+ }
37
42
Error :: Base58Length => String :: from ( "Invalid base58 address length" ) ,
38
43
Error :: Base58Prefix => String :: from ( "Invalid base58 prefix value" ) ,
39
44
#[ cfg( feature = "ecdsa" ) ]
@@ -44,12 +49,18 @@ impl Error {
44
49
Error :: EcdsaSignatureGen => String :: from ( "Signing failed" ) ,
45
50
#[ cfg( feature = "ecdsa" ) ]
46
51
Error :: EcdsaSignatureLength => String :: from ( "Invalid ecdsa signature size" ) ,
47
- Error :: InvalidEntropy => String :: from ( "Invalid entropy size, only 16, 20, 24, 28, and 32 bytes are supported" ) ,
52
+ Error :: InvalidEntropy => String :: from (
53
+ "Invalid entropy size, only 16, 20, 24, 28, and 32 bytes are supported" ,
54
+ ) ,
48
55
#[ cfg( feature = "ecdsa" ) ]
49
56
Error :: NoSoftDerivationEcdsa => String :: from ( "Soft derivation is impossible for ecdsa" ) ,
50
57
#[ cfg( feature = "ed25519" ) ]
51
- Error :: NoSoftDerivationEd25519 => String :: from ( "Soft derivation is impossible for ed25519" ) ,
52
- Error :: Pbkdf2Internal => String :: from ( "Pbkdf2 hashing internal error, please report this" ) ,
58
+ Error :: NoSoftDerivationEd25519 => {
59
+ String :: from ( "Soft derivation is impossible for ed25519" )
60
+ }
61
+ Error :: Pbkdf2Internal => {
62
+ String :: from ( "Pbkdf2 hashing internal error, please report this" )
63
+ }
53
64
}
54
65
}
55
66
}
@@ -62,4 +73,3 @@ impl Display for Error {
62
73
63
74
#[ cfg( feature = "std" ) ]
64
75
impl std:: error:: Error for Error { }
65
-
0 commit comments