@@ -223,27 +223,27 @@ impl From<KVStoreUpdatingPersisterError> for io::Error {
223
223
match value {
224
224
KVStoreUpdatingPersisterError :: BadMonitorName { reason, context } => io:: Error :: new (
225
225
io:: ErrorKind :: InvalidInput ,
226
- format ! ( "{}, context: {}'" , reason, context) ,
226
+ format ! ( "BadMonitorName, {}, context: {}'" , reason, context) ,
227
227
) ,
228
228
KVStoreUpdatingPersisterError :: MonitorDecodeFailed { reason, context } => {
229
229
io:: Error :: new (
230
230
io:: ErrorKind :: InvalidData ,
231
- format ! ( "{}, context: {}'" , reason, context) ,
231
+ format ! ( "MonitorDecodeFailed, {}, context: {}'" , reason, context) ,
232
232
)
233
233
}
234
234
KVStoreUpdatingPersisterError :: UpdateDecodeFailed { reason, context } => {
235
235
io:: Error :: new (
236
236
io:: ErrorKind :: InvalidData ,
237
- format ! ( "{}, context: {}'" , reason, context) ,
237
+ format ! ( "UpdateDecodeFailed, {}, context: {}'" , reason, context) ,
238
238
)
239
239
}
240
240
KVStoreUpdatingPersisterError :: StorageReadFailed { reason, context } => io:: Error :: new (
241
241
io:: ErrorKind :: Other ,
242
- format ! ( "{}, context: {}'" , reason, context) ,
242
+ format ! ( "StorageReadFailed, {}, context: {}'" , reason, context) ,
243
243
) ,
244
244
KVStoreUpdatingPersisterError :: UpdateFailed { reason, context } => io:: Error :: new (
245
245
io:: ErrorKind :: InvalidData ,
246
- format ! ( "{}, context: {}'" , reason, context) ,
246
+ format ! ( "UpdateFailed, {}, context: {}'" , reason, context) ,
247
247
) ,
248
248
}
249
249
}
@@ -451,6 +451,8 @@ where
451
451
}
452
452
}
453
453
454
+
455
+
454
456
/// Deserialize a channel monitor update.
455
457
fn deserialize_monitor_update (
456
458
& self ,
@@ -607,10 +609,10 @@ mod tests {
607
609
( 21 , "00000000000000000021" ) ,
608
610
( u64:: MAX , "18446744073709551615" ) ,
609
611
] ;
610
- for ( input, expected) in cases {
611
- let update_name = UpdateName :: from ( input) ;
612
- assert_eq ! ( update_name. 0 , expected) ;
613
- assert_eq ! ( update_name. storage_key( ) , expected) ;
612
+ for ( input, expected) in & cases {
613
+ let update_name = UpdateName :: from ( * input) ;
614
+ assert_eq ! ( update_name. 0 , * expected) ;
615
+ assert_eq ! ( update_name. storage_key( ) , * expected) ;
614
616
}
615
617
}
616
618
@@ -638,10 +640,10 @@ mod tests {
638
640
"f33dbeeff33dbeeff33dbeeff33dbeeff33dbeeff33dbeeff33dbeeff33dbeef_65535" ,
639
641
) ,
640
642
] ;
641
- for ( input, expected) in cases {
642
- let monitor_name = MonitorName :: from ( input) ;
643
- assert_eq ! ( monitor_name. 0 , expected) ;
644
- assert_eq ! ( monitor_name. storage_key( ) , expected) ;
643
+ for ( input, expected) in & cases {
644
+ let monitor_name = MonitorName :: from ( * input) ;
645
+ assert_eq ! ( monitor_name. 0 , * expected) ;
646
+ assert_eq ! ( monitor_name. storage_key( ) , * expected) ;
645
647
}
646
648
}
647
649
0 commit comments