File tree Expand file tree Collapse file tree 2 files changed +39
-1
lines changed Expand file tree Collapse file tree 2 files changed +39
-1
lines changed Original file line number Diff line number Diff line change @@ -26,6 +26,6 @@ rand = "0.8.5"
26
26
[features ]
27
27
default = [" signing" ]
28
28
29
- std = []
29
+ std = [" reddsa/std " ]
30
30
signing = [" dep:blake3" , " dep:rand_chacha" , " std" ]
31
31
dkg = []
Original file line number Diff line number Diff line change @@ -36,3 +36,41 @@ impl From<ed25519_dalek::SignatureError> for IronfishFrostError {
36
36
IronfishFrostError :: SignatureError ( error)
37
37
}
38
38
}
39
+
40
+ #[ cfg( feature = "std" ) ]
41
+ use std:: fmt;
42
+
43
+ #[ cfg( feature = "std" ) ]
44
+ impl fmt:: Display for IronfishFrostError {
45
+ fn fmt ( & self , f : & mut fmt:: Formatter < ' _ > ) -> Result < ( ) , fmt:: Error > {
46
+ match self {
47
+ Self :: InvalidInput => {
48
+ write ! ( f, "invalid input" ) ?;
49
+ Ok ( ( ) )
50
+ }
51
+ Self :: StdError => {
52
+ write ! ( f, "std error" ) ?;
53
+ Ok ( ( ) )
54
+ }
55
+ Self :: FrostError ( e) => {
56
+ write ! ( f, "frost error: " ) ?;
57
+ e. fmt ( f)
58
+ }
59
+ Self :: IoError ( e) => {
60
+ write ! ( f, "io error: " ) ?;
61
+ e. fmt ( f)
62
+ }
63
+ Self :: SignatureError ( e) => {
64
+ write ! ( f, "signature rror: " ) ?;
65
+ e. fmt ( f)
66
+ }
67
+ Self :: ChecksumError ( e) => {
68
+ write ! ( f, "checksum error: " ) ?;
69
+ e. fmt ( f)
70
+ }
71
+ }
72
+ }
73
+ }
74
+
75
+ #[ cfg( feature = "std" ) ]
76
+ impl std:: error:: Error for IronfishFrostError { }
You can’t perform that action at this time.
0 commit comments