File tree Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -364,10 +364,8 @@ impl FromStr for SignedRawBolt11Invoice {
364
364
fn from_str ( s : & str ) -> Result < Self , Self :: Err > {
365
365
let parsed = CheckedHrpstring :: new :: < Bech32 > ( s) ?;
366
366
let hrp = parsed. hrp ( ) ;
367
- // Access original non-packed 32 byte values (as ascii + conversion)
368
- let data: Vec < _ > = parsed. data_part_ascii_no_checksum ( ) . iter ( )
369
- . map ( |ch| Fe32 :: from_char ( char:: from ( * ch) ) . expect ( "value should be < 32" ) )
370
- . collect ( ) ;
367
+ // Access original non-packed 32 byte values (as Fe32s)
368
+ let data: Vec < _ > = parsed. fe32_iter :: < alloc:: boxed:: Box < dyn Iterator < Item = u8 > > > ( ) . collect ( ) ;
371
369
372
370
const SIGNATURE_LEN5 : usize = 104 ; // 32-bit values, 65 bytes
373
371
if data. len ( ) < SIGNATURE_LEN5 {
You can’t perform that action at this time.
0 commit comments