@@ -3061,8 +3061,8 @@ impl Writeable for PendingHTLCInfo {
3061
3061
}
3062
3062
}
3063
3063
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 > {
3066
3066
Ok ( PendingHTLCInfo {
3067
3067
onion_packet : Readable :: read ( reader) ?,
3068
3068
incoming_shared_secret : Readable :: read ( reader) ?,
@@ -3090,9 +3090,9 @@ impl Writeable for HTLCFailureMsg {
3090
3090
}
3091
3091
}
3092
3092
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) ? {
3096
3096
0 => Ok ( HTLCFailureMsg :: Relay ( Readable :: read ( reader) ?) ) ,
3097
3097
1 => Ok ( HTLCFailureMsg :: Malformed ( Readable :: read ( reader) ?) ) ,
3098
3098
_ => Err ( DecodeError :: InvalidValue ) ,
@@ -3116,9 +3116,9 @@ impl Writeable for PendingHTLCStatus {
3116
3116
}
3117
3117
}
3118
3118
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) ? {
3122
3122
0 => Ok ( PendingHTLCStatus :: Forward ( Readable :: read ( reader) ?) ) ,
3123
3123
1 => Ok ( PendingHTLCStatus :: Fail ( Readable :: read ( reader) ?) ) ,
3124
3124
_ => Err ( DecodeError :: InvalidValue ) ,
@@ -3150,9 +3150,9 @@ impl Writeable for HTLCSource {
3150
3150
}
3151
3151
}
3152
3152
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) ? {
3156
3156
0 => Ok ( HTLCSource :: PreviousHopData ( Readable :: read ( reader) ?) ) ,
3157
3157
1 => Ok ( HTLCSource :: OutboundRoute {
3158
3158
route : Readable :: read ( reader) ?,
@@ -3181,9 +3181,9 @@ impl Writeable for HTLCFailReason {
3181
3181
}
3182
3182
}
3183
3183
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) ? {
3187
3187
0 => Ok ( HTLCFailReason :: LightningError { err : Readable :: read ( reader) ? } ) ,
3188
3188
1 => Ok ( HTLCFailReason :: Reason {
3189
3189
failure_code : Readable :: read ( reader) ?,
@@ -3213,9 +3213,9 @@ impl Writeable for HTLCForwardInfo {
3213
3213
}
3214
3214
}
3215
3215
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) ? {
3219
3219
0 => Ok ( HTLCForwardInfo :: AddHTLC {
3220
3220
prev_short_channel_id : Readable :: read ( reader) ?,
3221
3221
prev_htlc_id : Readable :: read ( reader) ?,
@@ -3354,27 +3354,27 @@ pub struct ChannelManagerReadArgs<'a, ChanSigner: 'a + ChannelKeys, M: Deref, T:
3354
3354
3355
3355
// Implement ReadableArgs for an Arc'd ChannelManager to make it a bit easier to work with the
3356
3356
// 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 > > )
3359
3359
where M :: Target : ManyChannelMonitor < ChanSigner > ,
3360
3360
T :: Target : BroadcasterInterface ,
3361
3361
K :: Target : KeysInterface < ChanKeySigner = ChanSigner > ,
3362
3362
F :: Target : FeeEstimator ,
3363
3363
{
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 > {
3365
3365
let ( blockhash, chan_manager) = <( Sha256dHash , ChannelManager < ChanSigner , M , T , K , F > ) >:: read ( reader, args) ?;
3366
3366
Ok ( ( blockhash, Arc :: new ( chan_manager) ) )
3367
3367
}
3368
3368
}
3369
3369
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 > )
3372
3372
where M :: Target : ManyChannelMonitor < ChanSigner > ,
3373
3373
T :: Target : BroadcasterInterface ,
3374
3374
K :: Target : KeysInterface < ChanKeySigner = ChanSigner > ,
3375
3375
F :: Target : FeeEstimator ,
3376
3376
{
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 > {
3378
3378
let _ver: u8 = Readable :: read ( reader) ?;
3379
3379
let min_ver: u8 = Readable :: read ( reader) ?;
3380
3380
if min_ver > SERIALIZATION_VERSION {
0 commit comments