@@ -48,7 +48,7 @@ pub(crate) struct TestApi {
4848impl ProvideRuntimeApi < Block > for TestApi {
4949 type Api = RuntimeApi ;
5050
51- fn runtime_api < ' a > ( & ' a self ) -> ApiRef < ' a , Self :: Api > {
51+ fn runtime_api ( & self ) -> ApiRef < ' _ , Self :: Api > {
5252 RuntimeApi { authorities : self . authorities . clone ( ) } . into ( )
5353 }
5454}
@@ -530,7 +530,7 @@ impl DhtValueFoundTester {
530530 ) -> Option < & HashSet < Multiaddr > > {
531531 let ( _dht_event_tx, dht_event_rx) = channel ( 1 ) ;
532532 let local_test_api =
533- Arc :: new ( TestApi { authorities : vec ! [ self . remote_authority_public. clone ( ) . into( ) ] } ) ;
533+ Arc :: new ( TestApi { authorities : vec ! [ self . remote_authority_public. into( ) ] } ) ;
534534 let local_network: Arc < TestNetwork > = Arc :: new ( Default :: default ( ) ) ;
535535 let local_key_store = KeyStore :: new ( ) ;
536536
@@ -555,8 +555,7 @@ impl DhtValueFoundTester {
555555 self . local_worker
556556 . as_ref ( )
557557 . map ( |w| {
558- w. addr_cache
559- . get_addresses_by_authority_id ( & self . remote_authority_public . clone ( ) . into ( ) )
558+ w. addr_cache . get_addresses_by_authority_id ( & self . remote_authority_public . into ( ) )
560559 } )
561560 . unwrap ( )
562561 }
@@ -569,7 +568,7 @@ fn limit_number_of_addresses_added_to_cache_per_authority() {
569568 let addresses = ( 1 ..100 ) . map ( |i| tester. multiaddr_with_peer_id ( i) ) . collect ( ) ;
570569 let kv_pairs = block_on ( build_dht_event :: < TestNetwork > (
571570 addresses,
572- tester. remote_authority_public . clone ( ) . into ( ) ,
571+ tester. remote_authority_public . into ( ) ,
573572 & tester. remote_key_store ,
574573 None ,
575574 ) ) ;
@@ -584,7 +583,7 @@ fn strict_accept_address_with_peer_signature() {
584583 let addr = tester. multiaddr_with_peer_id ( 1 ) ;
585584 let kv_pairs = block_on ( build_dht_event (
586585 vec ! [ addr. clone( ) ] ,
587- tester. remote_authority_public . clone ( ) . into ( ) ,
586+ tester. remote_authority_public . into ( ) ,
588587 & tester. remote_key_store ,
589588 Some ( & TestSigner { keypair : & tester. remote_node_key } ) ,
590589 ) ) ;
@@ -604,7 +603,7 @@ fn reject_address_with_rogue_peer_signature() {
604603 let rogue_remote_node_key = Keypair :: generate_ed25519 ( ) ;
605604 let kv_pairs = block_on ( build_dht_event (
606605 vec ! [ tester. multiaddr_with_peer_id( 1 ) ] ,
607- tester. remote_authority_public . clone ( ) . into ( ) ,
606+ tester. remote_authority_public . into ( ) ,
608607 & tester. remote_key_store ,
609608 Some ( & TestSigner { keypair : & rogue_remote_node_key } ) ,
610609 ) ) ;
@@ -622,7 +621,7 @@ fn reject_address_with_invalid_peer_signature() {
622621 let mut tester = DhtValueFoundTester :: new ( ) ;
623622 let mut kv_pairs = block_on ( build_dht_event (
624623 vec ! [ tester. multiaddr_with_peer_id( 1 ) ] ,
625- tester. remote_authority_public . clone ( ) . into ( ) ,
624+ tester. remote_authority_public . into ( ) ,
626625 & tester. remote_key_store ,
627626 Some ( & TestSigner { keypair : & tester. remote_node_key } ) ,
628627 ) ) ;
@@ -644,7 +643,7 @@ fn reject_address_without_peer_signature() {
644643 let mut tester = DhtValueFoundTester :: new ( ) ;
645644 let kv_pairs = block_on ( build_dht_event :: < TestNetwork > (
646645 vec ! [ tester. multiaddr_with_peer_id( 1 ) ] ,
647- tester. remote_authority_public . clone ( ) . into ( ) ,
646+ tester. remote_authority_public . into ( ) ,
648647 & tester. remote_key_store ,
649648 None ,
650649 ) ) ;
@@ -662,7 +661,7 @@ fn do_not_cache_addresses_without_peer_id() {
662661 "/ip6/2001:db8:0:0:0:0:0:2/tcp/30333" . parse ( ) . unwrap ( ) ;
663662 let kv_pairs = block_on ( build_dht_event :: < TestNetwork > (
664663 vec ! [ multiaddr_with_peer_id. clone( ) , multiaddr_without_peer_id] ,
665- tester. remote_authority_public . clone ( ) . into ( ) ,
664+ tester. remote_authority_public . into ( ) ,
666665 & tester. remote_key_store ,
667666 None ,
668667 ) ) ;
0 commit comments