@@ -3062,8 +3062,8 @@ impl Writeable for PendingHTLCInfo {
3062
3062
}
3063
3063
}
3064
3064
3065
- impl < R : :: std :: io :: Read > Readable < R > for PendingHTLCInfo {
3066
- fn read ( reader : & mut R ) -> Result < PendingHTLCInfo , DecodeError > {
3065
+ impl Readable for PendingHTLCInfo {
3066
+ fn read < R : :: std :: io :: Read > ( reader : & mut R ) -> Result < PendingHTLCInfo , DecodeError > {
3067
3067
Ok ( PendingHTLCInfo {
3068
3068
onion_packet : Readable :: read ( reader) ?,
3069
3069
incoming_shared_secret : Readable :: read ( reader) ?,
@@ -3091,9 +3091,9 @@ impl Writeable for HTLCFailureMsg {
3091
3091
}
3092
3092
}
3093
3093
3094
- impl < R : :: std :: io :: Read > Readable < R > for HTLCFailureMsg {
3095
- fn read ( reader : & mut R ) -> Result < HTLCFailureMsg , DecodeError > {
3096
- match <u8 as Readable < R > >:: read ( reader) ? {
3094
+ impl Readable for HTLCFailureMsg {
3095
+ fn read < R : :: std :: io :: Read > ( reader : & mut R ) -> Result < HTLCFailureMsg , DecodeError > {
3096
+ match <u8 as Readable >:: read ( reader) ? {
3097
3097
0 => Ok ( HTLCFailureMsg :: Relay ( Readable :: read ( reader) ?) ) ,
3098
3098
1 => Ok ( HTLCFailureMsg :: Malformed ( Readable :: read ( reader) ?) ) ,
3099
3099
_ => Err ( DecodeError :: InvalidValue ) ,
@@ -3117,9 +3117,9 @@ impl Writeable for PendingHTLCStatus {
3117
3117
}
3118
3118
}
3119
3119
3120
- impl < R : :: std :: io :: Read > Readable < R > for PendingHTLCStatus {
3121
- fn read ( reader : & mut R ) -> Result < PendingHTLCStatus , DecodeError > {
3122
- match <u8 as Readable < R > >:: read ( reader) ? {
3120
+ impl Readable for PendingHTLCStatus {
3121
+ fn read < R : :: std :: io :: Read > ( reader : & mut R ) -> Result < PendingHTLCStatus , DecodeError > {
3122
+ match <u8 as Readable >:: read ( reader) ? {
3123
3123
0 => Ok ( PendingHTLCStatus :: Forward ( Readable :: read ( reader) ?) ) ,
3124
3124
1 => Ok ( PendingHTLCStatus :: Fail ( Readable :: read ( reader) ?) ) ,
3125
3125
_ => Err ( DecodeError :: InvalidValue ) ,
@@ -3151,9 +3151,9 @@ impl Writeable for HTLCSource {
3151
3151
}
3152
3152
}
3153
3153
3154
- impl < R : :: std :: io :: Read > Readable < R > for HTLCSource {
3155
- fn read ( reader : & mut R ) -> Result < HTLCSource , DecodeError > {
3156
- match <u8 as Readable < R > >:: read ( reader) ? {
3154
+ impl Readable for HTLCSource {
3155
+ fn read < R : :: std :: io :: Read > ( reader : & mut R ) -> Result < HTLCSource , DecodeError > {
3156
+ match <u8 as Readable >:: read ( reader) ? {
3157
3157
0 => Ok ( HTLCSource :: PreviousHopData ( Readable :: read ( reader) ?) ) ,
3158
3158
1 => Ok ( HTLCSource :: OutboundRoute {
3159
3159
route : Readable :: read ( reader) ?,
@@ -3182,9 +3182,9 @@ impl Writeable for HTLCFailReason {
3182
3182
}
3183
3183
}
3184
3184
3185
- impl < R : :: std :: io :: Read > Readable < R > for HTLCFailReason {
3186
- fn read ( reader : & mut R ) -> Result < HTLCFailReason , DecodeError > {
3187
- match <u8 as Readable < R > >:: read ( reader) ? {
3185
+ impl Readable for HTLCFailReason {
3186
+ fn read < R : :: std :: io :: Read > ( reader : & mut R ) -> Result < HTLCFailReason , DecodeError > {
3187
+ match <u8 as Readable >:: read ( reader) ? {
3188
3188
0 => Ok ( HTLCFailReason :: LightningError { err : Readable :: read ( reader) ? } ) ,
3189
3189
1 => Ok ( HTLCFailReason :: Reason {
3190
3190
failure_code : Readable :: read ( reader) ?,
@@ -3214,9 +3214,9 @@ impl Writeable for HTLCForwardInfo {
3214
3214
}
3215
3215
}
3216
3216
3217
- impl < R : :: std :: io :: Read > Readable < R > for HTLCForwardInfo {
3218
- fn read ( reader : & mut R ) -> Result < HTLCForwardInfo , DecodeError > {
3219
- match <u8 as Readable < R > >:: read ( reader) ? {
3217
+ impl Readable for HTLCForwardInfo {
3218
+ fn read < R : :: std :: io :: Read > ( reader : & mut R ) -> Result < HTLCForwardInfo , DecodeError > {
3219
+ match <u8 as Readable >:: read ( reader) ? {
3220
3220
0 => Ok ( HTLCForwardInfo :: AddHTLC {
3221
3221
prev_short_channel_id : Readable :: read ( reader) ?,
3222
3222
prev_htlc_id : Readable :: read ( reader) ?,
@@ -3355,27 +3355,27 @@ pub struct ChannelManagerReadArgs<'a, ChanSigner: 'a + ChannelKeys, M: Deref, T:
3355
3355
3356
3356
// Implement ReadableArgs for an Arc'd ChannelManager to make it a bit easier to work with the
3357
3357
// SipmleArcChannelManager type:
3358
- impl < ' a , R : :: std :: io :: Read , ChanSigner : ChannelKeys + Readable < R > , M : Deref , T : Deref , K : Deref , F : Deref >
3359
- ReadableArgs < R , ChannelManagerReadArgs < ' a , ChanSigner , M , T , K , F > > for ( Sha256dHash , Arc < ChannelManager < ChanSigner , M , T , K , F > > )
3358
+ impl < ' a , ChanSigner : ChannelKeys + Readable , M : Deref , T : Deref , K : Deref , F : Deref >
3359
+ ReadableArgs < ChannelManagerReadArgs < ' a , ChanSigner , M , T , K , F > > for ( Sha256dHash , Arc < ChannelManager < ChanSigner , M , T , K , F > > )
3360
3360
where M :: Target : ManyChannelMonitor < ChanSigner > ,
3361
3361
T :: Target : BroadcasterInterface ,
3362
3362
K :: Target : KeysInterface < ChanKeySigner = ChanSigner > ,
3363
3363
F :: Target : FeeEstimator ,
3364
3364
{
3365
- fn read ( reader : & mut R , args : ChannelManagerReadArgs < ' a , ChanSigner , M , T , K , F > ) -> Result < Self , DecodeError > {
3365
+ fn read < R : :: std :: io :: Read > ( reader : & mut R , args : ChannelManagerReadArgs < ' a , ChanSigner , M , T , K , F > ) -> Result < Self , DecodeError > {
3366
3366
let ( blockhash, chan_manager) = <( Sha256dHash , ChannelManager < ChanSigner , M , T , K , F > ) >:: read ( reader, args) ?;
3367
3367
Ok ( ( blockhash, Arc :: new ( chan_manager) ) )
3368
3368
}
3369
3369
}
3370
3370
3371
- impl < ' a , R : :: std :: io :: Read , ChanSigner : ChannelKeys + Readable < R > , M : Deref , T : Deref , K : Deref , F : Deref >
3372
- ReadableArgs < R , ChannelManagerReadArgs < ' a , ChanSigner , M , T , K , F > > for ( Sha256dHash , ChannelManager < ChanSigner , M , T , K , F > )
3371
+ impl < ' a , ChanSigner : ChannelKeys + Readable , M : Deref , T : Deref , K : Deref , F : Deref >
3372
+ ReadableArgs < ChannelManagerReadArgs < ' a , ChanSigner , M , T , K , F > > for ( Sha256dHash , ChannelManager < ChanSigner , M , T , K , F > )
3373
3373
where M :: Target : ManyChannelMonitor < ChanSigner > ,
3374
3374
T :: Target : BroadcasterInterface ,
3375
3375
K :: Target : KeysInterface < ChanKeySigner = ChanSigner > ,
3376
3376
F :: Target : FeeEstimator ,
3377
3377
{
3378
- fn read ( reader : & mut R , args : ChannelManagerReadArgs < ' a , ChanSigner , M , T , K , F > ) -> Result < Self , DecodeError > {
3378
+ fn read < R : :: std :: io :: Read > ( reader : & mut R , args : ChannelManagerReadArgs < ' a , ChanSigner , M , T , K , F > ) -> Result < Self , DecodeError > {
3379
3379
let _ver: u8 = Readable :: read ( reader) ?;
3380
3380
let min_ver: u8 = Readable :: read ( reader) ?;
3381
3381
if min_ver > SERIALIZATION_VERSION {
0 commit comments