@@ -54,7 +54,7 @@ impl<const N: usize> FromBase32 for [u8; N] {
54
54
Bolt11ParseError :: InvalidSliceLength (
55
55
data. len ( ) ,
56
56
( N * 8 + 4 ) / 5 ,
57
- "<[u8; N]>::from_base32()" . into ( ) ,
57
+ "<[u8; N]>" ,
58
58
)
59
59
} )
60
60
}
@@ -68,7 +68,7 @@ impl FromBase32 for PaymentSecret {
68
68
return Err ( Bolt11ParseError :: InvalidSliceLength (
69
69
field_data. len ( ) ,
70
70
52 ,
71
- "PaymentSecret::from_base32()" . into ( ) ,
71
+ "payment secret" ,
72
72
) ) ;
73
73
}
74
74
let data_bytes = <[ u8 ; 32 ] >:: from_base32 ( field_data) ?;
@@ -456,7 +456,7 @@ impl FromBase32 for PositiveTimestamp {
456
456
return Err ( Bolt11ParseError :: InvalidSliceLength (
457
457
b32. len ( ) ,
458
458
7 ,
459
- "PositiveTimestamp::from_base32()" . into ( ) ,
459
+ "timestamp" ,
460
460
) ) ;
461
461
}
462
462
let timestamp: u64 = parse_u64_be ( b32)
@@ -475,7 +475,7 @@ impl FromBase32 for Bolt11InvoiceSignature {
475
475
return Err ( Bolt11ParseError :: InvalidSliceLength (
476
476
signature. len ( ) ,
477
477
104 ,
478
- "Bolt11InvoiceSignature::from_base32()" . into ( ) ,
478
+ "signature" ,
479
479
) ) ;
480
480
}
481
481
let recoverable_signature_bytes = <[ u8 ; 65 ] >:: from_base32 ( signature) ?;
@@ -745,11 +745,11 @@ impl Display for Bolt11ParseError {
745
745
Bolt11ParseError :: DescriptionDecodeError ( ref e) => {
746
746
write ! ( f, "Description is not a valid utf-8 string: {}" , e)
747
747
}
748
- Bolt11ParseError :: InvalidSliceLength ( ref len, ref expected, ref function ) => {
748
+ Bolt11ParseError :: InvalidSliceLength ( ref len, ref expected, ref elemen ) => {
749
749
write ! (
750
750
f,
751
- "Slice had length {} instead of {} in function {}" ,
752
- len, expected, function
751
+ "Slice had length {} instead of {} for element {}" ,
752
+ len, expected, elemen
753
753
)
754
754
} ,
755
755
Bolt11ParseError :: BadPrefix => f. write_str ( "did not begin with 'ln'" ) ,
0 commit comments