@@ -223,27 +223,27 @@ impl From<KVStoreUpdatingPersisterError> for io::Error {
223223 match value {
224224 KVStoreUpdatingPersisterError :: BadMonitorName { reason, context } => io:: Error :: new (
225225 io:: ErrorKind :: InvalidInput ,
226- format ! ( "{}, context: {}'" , reason, context) ,
226+ format ! ( "BadMonitorName, {}, context: {}'" , reason, context) ,
227227 ) ,
228228 KVStoreUpdatingPersisterError :: MonitorDecodeFailed { reason, context } => {
229229 io:: Error :: new (
230230 io:: ErrorKind :: InvalidData ,
231- format ! ( "{}, context: {}'" , reason, context) ,
231+ format ! ( "MonitorDecodeFailed, {}, context: {}'" , reason, context) ,
232232 )
233233 }
234234 KVStoreUpdatingPersisterError :: UpdateDecodeFailed { reason, context } => {
235235 io:: Error :: new (
236236 io:: ErrorKind :: InvalidData ,
237- format ! ( "{}, context: {}'" , reason, context) ,
237+ format ! ( "UpdateDecodeFailed, {}, context: {}'" , reason, context) ,
238238 )
239239 }
240240 KVStoreUpdatingPersisterError :: StorageReadFailed { reason, context } => io:: Error :: new (
241241 io:: ErrorKind :: Other ,
242- format ! ( "{}, context: {}'" , reason, context) ,
242+ format ! ( "StorageReadFailed, {}, context: {}'" , reason, context) ,
243243 ) ,
244244 KVStoreUpdatingPersisterError :: UpdateFailed { reason, context } => io:: Error :: new (
245245 io:: ErrorKind :: InvalidData ,
246- format ! ( "{}, context: {}'" , reason, context) ,
246+ format ! ( "UpdateFailed, {}, context: {}'" , reason, context) ,
247247 ) ,
248248 }
249249 }
@@ -451,6 +451,8 @@ where
451451 }
452452 }
453453
454+
455+
454456 /// Deserialize a channel monitor update.
455457 fn deserialize_monitor_update (
456458 & self ,
@@ -607,10 +609,10 @@ mod tests {
607609 ( 21 , "00000000000000000021" ) ,
608610 ( u64:: MAX , "18446744073709551615" ) ,
609611 ] ;
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) ;
614616 }
615617 }
616618
@@ -638,10 +640,10 @@ mod tests {
638640 "f33dbeeff33dbeeff33dbeeff33dbeeff33dbeeff33dbeeff33dbeeff33dbeef_65535" ,
639641 ) ,
640642 ] ;
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) ;
645647 }
646648 }
647649
0 commit comments