File tree 1 file changed +3
-11
lines changed
1 file changed +3
-11
lines changed Original file line number Diff line number Diff line change @@ -394,15 +394,6 @@ impl Writeable for OfferContents {
394
394
}
395
395
}
396
396
397
- impl TryFrom < Vec < u8 > > for Offer {
398
- type Error = ParseError ;
399
-
400
- fn try_from ( bytes : Vec < u8 > ) -> Result < Self , Self :: Error > {
401
- let parsed_message = ParsedMessage :: < OfferTlvStream > :: try_from ( bytes) ?;
402
- Offer :: try_from ( parsed_message)
403
- }
404
- }
405
-
406
397
/// The minimum amount required for an item in an [`Offer`], denominated in either bitcoin or
407
398
/// another currency.
408
399
#[ derive( Clone , Debug , PartialEq ) ]
@@ -475,10 +466,11 @@ impl FromStr for Offer {
475
466
}
476
467
}
477
468
478
- impl TryFrom < ParsedMessage < OfferTlvStream > > for Offer {
469
+ impl TryFrom < Vec < u8 > > for Offer {
479
470
type Error = ParseError ;
480
471
481
- fn try_from ( offer : ParsedMessage < OfferTlvStream > ) -> Result < Self , Self :: Error > {
472
+ fn try_from ( bytes : Vec < u8 > ) -> Result < Self , Self :: Error > {
473
+ let offer = ParsedMessage :: < OfferTlvStream > :: try_from ( bytes) ?;
482
474
let ParsedMessage { bytes, tlv_stream } = offer;
483
475
let contents = OfferContents :: try_from ( tlv_stream) ?;
484
476
Ok ( Offer { bytes, contents } )
You can’t perform that action at this time.
0 commit comments