File tree Expand file tree Collapse file tree 3 files changed +1
-95
lines changed Expand file tree Collapse file tree 3 files changed +1
-95
lines changed Original file line number Diff line number Diff line change @@ -384,53 +384,6 @@ impl From<UncheckedHrpstringError> for DecodeError {
384
384
fn from ( e : UncheckedHrpstringError ) -> Self { Self :: Parse ( e) }
385
385
}
386
386
387
- /// An error while decoding an address from a reader.
388
- #[ cfg( feature = "std" ) ]
389
- #[ derive( Debug ) ]
390
- #[ non_exhaustive]
391
- pub enum DecodeFromReaderError {
392
- /// Read error.
393
- Read ( std:: io:: Error ) ,
394
- /// Decode error.
395
- Decode ( DecodeError ) ,
396
- }
397
-
398
- #[ cfg( feature = "std" ) ]
399
- impl fmt:: Display for DecodeFromReaderError {
400
- fn fmt ( & self , f : & mut fmt:: Formatter ) -> fmt:: Result {
401
- use DecodeFromReaderError :: * ;
402
-
403
- match * self {
404
- Read ( ref e) => write_err ! ( f, "read failed" ; e) ,
405
- Decode ( ref e) => write_err ! ( f, "decoding failed" ; e) ,
406
- }
407
- }
408
- }
409
-
410
- #[ cfg( feature = "std" ) ]
411
- impl std:: error:: Error for DecodeFromReaderError {
412
- fn source ( & self ) -> Option < & ( dyn std:: error:: Error + ' static ) > {
413
- use DecodeFromReaderError :: * ;
414
-
415
- match * self {
416
- Read ( ref e) => Some ( e) ,
417
- Decode ( ref e) => Some ( e) ,
418
- }
419
- }
420
- }
421
-
422
- #[ cfg( feature = "std" ) ]
423
- impl From < std:: io:: Error > for DecodeFromReaderError {
424
- #[ inline]
425
- fn from ( e : std:: io:: Error ) -> Self { Self :: Read ( e) }
426
- }
427
-
428
- #[ cfg( feature = "std" ) ]
429
- impl From < DecodeError > for DecodeFromReaderError {
430
- #[ inline]
431
- fn from ( e : DecodeError ) -> Self { Self :: Decode ( e) }
432
- }
433
-
434
387
#[ cfg( test) ]
435
388
#[ cfg( feature = "alloc" ) ]
436
389
mod tests {
Original file line number Diff line number Diff line change @@ -55,7 +55,7 @@ pub fn validate_witness_program_length(
55
55
/// Field element does not represent a valid witness version.
56
56
#[ derive( Debug , Clone , PartialEq , Eq ) ]
57
57
#[ non_exhaustive]
58
- pub struct InvalidWitnessVersionError ( Fe32 ) ;
58
+ pub struct InvalidWitnessVersionError ( pub Fe32 ) ;
59
59
60
60
impl fmt:: Display for InvalidWitnessVersionError {
61
61
fn fmt ( & self , f : & mut fmt:: Formatter ) -> fmt:: Result {
Original file line number Diff line number Diff line change @@ -288,53 +288,6 @@ impl From<SegwitHrpstringError> for DecodeError {
288
288
fn from ( e : SegwitHrpstringError ) -> Self { Self ( e) }
289
289
}
290
290
291
- /// An error while decoding a segwit address from a reader.
292
- #[ cfg( feature = "std" ) ]
293
- #[ derive( Debug ) ]
294
- #[ non_exhaustive]
295
- pub enum DecodeFromReaderError {
296
- /// Read error.
297
- Read ( std:: io:: Error ) ,
298
- /// Decode error.
299
- Decode ( DecodeError ) ,
300
- }
301
-
302
- #[ cfg( feature = "std" ) ]
303
- impl fmt:: Display for DecodeFromReaderError {
304
- fn fmt ( & self , f : & mut fmt:: Formatter ) -> fmt:: Result {
305
- use DecodeFromReaderError :: * ;
306
-
307
- match * self {
308
- Read ( ref e) => write_err ! ( f, "read failed" ; e) ,
309
- Decode ( ref e) => write_err ! ( f, "decoding failed" ; e) ,
310
- }
311
- }
312
- }
313
-
314
- #[ cfg( feature = "std" ) ]
315
- impl std:: error:: Error for DecodeFromReaderError {
316
- fn source ( & self ) -> Option < & ( dyn std:: error:: Error + ' static ) > {
317
- use DecodeFromReaderError :: * ;
318
-
319
- match * self {
320
- Read ( ref e) => Some ( e) ,
321
- Decode ( ref e) => Some ( e) ,
322
- }
323
- }
324
- }
325
-
326
- #[ cfg( feature = "std" ) ]
327
- impl From < std:: io:: Error > for DecodeFromReaderError {
328
- #[ inline]
329
- fn from ( e : std:: io:: Error ) -> Self { Self :: Read ( e) }
330
- }
331
-
332
- #[ cfg( feature = "std" ) ]
333
- impl From < DecodeError > for DecodeFromReaderError {
334
- #[ inline]
335
- fn from ( e : DecodeError ) -> Self { Self :: Decode ( e) }
336
- }
337
-
338
291
/// An error while constructing a [`SegwitHrpstring`] type.
339
292
#[ derive( Debug , Clone , PartialEq , Eq ) ]
340
293
#[ non_exhaustive]
You can’t perform that action at this time.
0 commit comments