@@ -54,7 +54,7 @@ impl<const N: usize> FromBase32 for [u8; N] {
5454 Bolt11ParseError :: InvalidSliceLength (
5555 data. len ( ) ,
5656 ( N * 8 + 4 ) / 5 ,
57- "<[u8; N]>::from_base32()" . into ( ) ,
57+ "<[u8; N]>" ,
5858 )
5959 } )
6060 }
@@ -68,7 +68,7 @@ impl FromBase32 for PaymentSecret {
6868 return Err ( Bolt11ParseError :: InvalidSliceLength (
6969 field_data. len ( ) ,
7070 52 ,
71- "PaymentSecret::from_base32()" . into ( ) ,
71+ "payment secret" ,
7272 ) ) ;
7373 }
7474 let data_bytes = <[ u8 ; 32 ] >:: from_base32 ( field_data) ?;
@@ -456,7 +456,7 @@ impl FromBase32 for PositiveTimestamp {
456456 return Err ( Bolt11ParseError :: InvalidSliceLength (
457457 b32. len ( ) ,
458458 7 ,
459- "PositiveTimestamp::from_base32()" . into ( ) ,
459+ "timestamp" ,
460460 ) ) ;
461461 }
462462 let timestamp: u64 = parse_u64_be ( b32)
@@ -475,7 +475,7 @@ impl FromBase32 for Bolt11InvoiceSignature {
475475 return Err ( Bolt11ParseError :: InvalidSliceLength (
476476 signature. len ( ) ,
477477 104 ,
478- "Bolt11InvoiceSignature::from_base32()" . into ( ) ,
478+ "signature" ,
479479 ) ) ;
480480 }
481481 let recoverable_signature_bytes = <[ u8 ; 65 ] >:: from_base32 ( signature) ?;
@@ -745,11 +745,11 @@ impl Display for Bolt11ParseError {
745745 Bolt11ParseError :: DescriptionDecodeError ( ref e) => {
746746 write ! ( f, "Description is not a valid utf-8 string: {}" , e)
747747 }
748- Bolt11ParseError :: InvalidSliceLength ( ref len, ref expected, ref function ) => {
748+ Bolt11ParseError :: InvalidSliceLength ( ref len, ref expected, ref elemen ) => {
749749 write ! (
750750 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
753753 )
754754 } ,
755755 Bolt11ParseError :: BadPrefix => f. write_str ( "did not begin with 'ln'" ) ,
0 commit comments