@@ -3061,8 +3061,8 @@ impl Writeable for PendingHTLCInfo {
30613061 }
30623062}
30633063
3064- impl < R : :: std :: io :: Read > Readable < R > for PendingHTLCInfo {
3065- fn read ( reader : & mut R ) -> Result < PendingHTLCInfo , DecodeError > {
3064+ impl Readable for PendingHTLCInfo {
3065+ fn read < R : :: std :: io :: Read > ( reader : & mut R ) -> Result < PendingHTLCInfo , DecodeError > {
30663066 Ok ( PendingHTLCInfo {
30673067 onion_packet : Readable :: read ( reader) ?,
30683068 incoming_shared_secret : Readable :: read ( reader) ?,
@@ -3090,9 +3090,9 @@ impl Writeable for HTLCFailureMsg {
30903090 }
30913091}
30923092
3093- impl < R : :: std :: io :: Read > Readable < R > for HTLCFailureMsg {
3094- fn read ( reader : & mut R ) -> Result < HTLCFailureMsg , DecodeError > {
3095- match <u8 as Readable < R > >:: read ( reader) ? {
3093+ impl Readable for HTLCFailureMsg {
3094+ fn read < R : :: std :: io :: Read > ( reader : & mut R ) -> Result < HTLCFailureMsg , DecodeError > {
3095+ match <u8 as Readable >:: read ( reader) ? {
30963096 0 => Ok ( HTLCFailureMsg :: Relay ( Readable :: read ( reader) ?) ) ,
30973097 1 => Ok ( HTLCFailureMsg :: Malformed ( Readable :: read ( reader) ?) ) ,
30983098 _ => Err ( DecodeError :: InvalidValue ) ,
@@ -3116,9 +3116,9 @@ impl Writeable for PendingHTLCStatus {
31163116 }
31173117}
31183118
3119- impl < R : :: std :: io :: Read > Readable < R > for PendingHTLCStatus {
3120- fn read ( reader : & mut R ) -> Result < PendingHTLCStatus , DecodeError > {
3121- match <u8 as Readable < R > >:: read ( reader) ? {
3119+ impl Readable for PendingHTLCStatus {
3120+ fn read < R : :: std :: io :: Read > ( reader : & mut R ) -> Result < PendingHTLCStatus , DecodeError > {
3121+ match <u8 as Readable >:: read ( reader) ? {
31223122 0 => Ok ( PendingHTLCStatus :: Forward ( Readable :: read ( reader) ?) ) ,
31233123 1 => Ok ( PendingHTLCStatus :: Fail ( Readable :: read ( reader) ?) ) ,
31243124 _ => Err ( DecodeError :: InvalidValue ) ,
@@ -3150,9 +3150,9 @@ impl Writeable for HTLCSource {
31503150 }
31513151}
31523152
3153- impl < R : :: std :: io :: Read > Readable < R > for HTLCSource {
3154- fn read ( reader : & mut R ) -> Result < HTLCSource , DecodeError > {
3155- match <u8 as Readable < R > >:: read ( reader) ? {
3153+ impl Readable for HTLCSource {
3154+ fn read < R : :: std :: io :: Read > ( reader : & mut R ) -> Result < HTLCSource , DecodeError > {
3155+ match <u8 as Readable >:: read ( reader) ? {
31563156 0 => Ok ( HTLCSource :: PreviousHopData ( Readable :: read ( reader) ?) ) ,
31573157 1 => Ok ( HTLCSource :: OutboundRoute {
31583158 route : Readable :: read ( reader) ?,
@@ -3181,9 +3181,9 @@ impl Writeable for HTLCFailReason {
31813181 }
31823182}
31833183
3184- impl < R : :: std :: io :: Read > Readable < R > for HTLCFailReason {
3185- fn read ( reader : & mut R ) -> Result < HTLCFailReason , DecodeError > {
3186- match <u8 as Readable < R > >:: read ( reader) ? {
3184+ impl Readable for HTLCFailReason {
3185+ fn read < R : :: std :: io :: Read > ( reader : & mut R ) -> Result < HTLCFailReason , DecodeError > {
3186+ match <u8 as Readable >:: read ( reader) ? {
31873187 0 => Ok ( HTLCFailReason :: LightningError { err : Readable :: read ( reader) ? } ) ,
31883188 1 => Ok ( HTLCFailReason :: Reason {
31893189 failure_code : Readable :: read ( reader) ?,
@@ -3213,9 +3213,9 @@ impl Writeable for HTLCForwardInfo {
32133213 }
32143214}
32153215
3216- impl < R : :: std :: io :: Read > Readable < R > for HTLCForwardInfo {
3217- fn read ( reader : & mut R ) -> Result < HTLCForwardInfo , DecodeError > {
3218- match <u8 as Readable < R > >:: read ( reader) ? {
3216+ impl Readable for HTLCForwardInfo {
3217+ fn read < R : :: std :: io :: Read > ( reader : & mut R ) -> Result < HTLCForwardInfo , DecodeError > {
3218+ match <u8 as Readable >:: read ( reader) ? {
32193219 0 => Ok ( HTLCForwardInfo :: AddHTLC {
32203220 prev_short_channel_id : Readable :: read ( reader) ?,
32213221 prev_htlc_id : Readable :: read ( reader) ?,
@@ -3354,27 +3354,27 @@ pub struct ChannelManagerReadArgs<'a, ChanSigner: 'a + ChannelKeys, M: Deref, T:
33543354
33553355// Implement ReadableArgs for an Arc'd ChannelManager to make it a bit easier to work with the
33563356// SipmleArcChannelManager type:
3357- impl < ' a , R : :: std :: io :: Read , ChanSigner : ChannelKeys + Readable < R > , M : Deref , T : Deref , K : Deref , F : Deref >
3358- ReadableArgs < R , ChannelManagerReadArgs < ' a , ChanSigner , M , T , K , F > > for ( Sha256dHash , Arc < ChannelManager < ChanSigner , M , T , K , F > > )
3357+ impl < ' a , ChanSigner : ChannelKeys + Readable , M : Deref , T : Deref , K : Deref , F : Deref >
3358+ ReadableArgs < ChannelManagerReadArgs < ' a , ChanSigner , M , T , K , F > > for ( Sha256dHash , Arc < ChannelManager < ChanSigner , M , T , K , F > > )
33593359 where M :: Target : ManyChannelMonitor < ChanSigner > ,
33603360 T :: Target : BroadcasterInterface ,
33613361 K :: Target : KeysInterface < ChanKeySigner = ChanSigner > ,
33623362 F :: Target : FeeEstimator ,
33633363{
3364- fn read ( reader : & mut R , args : ChannelManagerReadArgs < ' a , ChanSigner , M , T , K , F > ) -> Result < Self , DecodeError > {
3364+ fn read < R : :: std :: io :: Read > ( reader : & mut R , args : ChannelManagerReadArgs < ' a , ChanSigner , M , T , K , F > ) -> Result < Self , DecodeError > {
33653365 let ( blockhash, chan_manager) = <( Sha256dHash , ChannelManager < ChanSigner , M , T , K , F > ) >:: read ( reader, args) ?;
33663366 Ok ( ( blockhash, Arc :: new ( chan_manager) ) )
33673367 }
33683368}
33693369
3370- impl < ' a , R : :: std :: io :: Read , ChanSigner : ChannelKeys + Readable < R > , M : Deref , T : Deref , K : Deref , F : Deref >
3371- ReadableArgs < R , ChannelManagerReadArgs < ' a , ChanSigner , M , T , K , F > > for ( Sha256dHash , ChannelManager < ChanSigner , M , T , K , F > )
3370+ impl < ' a , ChanSigner : ChannelKeys + Readable , M : Deref , T : Deref , K : Deref , F : Deref >
3371+ ReadableArgs < ChannelManagerReadArgs < ' a , ChanSigner , M , T , K , F > > for ( Sha256dHash , ChannelManager < ChanSigner , M , T , K , F > )
33723372 where M :: Target : ManyChannelMonitor < ChanSigner > ,
33733373 T :: Target : BroadcasterInterface ,
33743374 K :: Target : KeysInterface < ChanKeySigner = ChanSigner > ,
33753375 F :: Target : FeeEstimator ,
33763376{
3377- fn read ( reader : & mut R , args : ChannelManagerReadArgs < ' a , ChanSigner , M , T , K , F > ) -> Result < Self , DecodeError > {
3377+ fn read < R : :: std :: io :: Read > ( reader : & mut R , args : ChannelManagerReadArgs < ' a , ChanSigner , M , T , K , F > ) -> Result < Self , DecodeError > {
33783378 let _ver: u8 = Readable :: read ( reader) ?;
33793379 let min_ver: u8 = Readable :: read ( reader) ?;
33803380 if min_ver > SERIALIZATION_VERSION {
0 commit comments