@@ -21,7 +21,7 @@ impl NodeStore {
2121 }
2222
2323 pub async fn get_node ( & self , address : String ) -> Result < Option < DiscoveryNode > , Error > {
24- let key = format ! ( "node:{}" , address ) ;
24+ let key = format ! ( "node:{address}" ) ;
2525 let mut con = self . get_connection ( ) . await ?;
2626 let node: Option < String > = con. get ( & key) . await ?;
2727 let node = match node {
@@ -39,7 +39,7 @@ impl NodeStore {
3939 return Ok ( None ) ;
4040 }
4141
42- let node_keys: Vec < String > = node_ids. iter ( ) . map ( |id| format ! ( "node:{}" , id ) ) . collect ( ) ;
42+ let node_keys: Vec < String > = node_ids. iter ( ) . map ( |id| format ! ( "node:{id}" ) ) . collect ( ) ;
4343 let serialized_nodes: Vec < String > =
4444 redis:: pipe ( ) . get ( & node_keys) . query_async ( & mut con) . await ?;
4545
@@ -60,7 +60,7 @@ impl NodeStore {
6060 return Ok ( 0 ) ;
6161 }
6262
63- let node_keys: Vec < String > = node_ids. iter ( ) . map ( |id| format ! ( "node:{}" , id ) ) . collect ( ) ;
63+ let node_keys: Vec < String > = node_ids. iter ( ) . map ( |id| format ! ( "node:{id}" ) ) . collect ( ) ;
6464
6565 let mut count = 0 ;
6666 for key in node_keys {
@@ -77,7 +77,7 @@ impl NodeStore {
7777
7878 pub async fn register_node ( & self , node : Node ) -> Result < ( ) , Error > {
7979 let address = node. id . clone ( ) ;
80- let key = format ! ( "node:{}" , address ) ;
80+ let key = format ! ( "node:{address}" ) ;
8181
8282 let mut con = self . get_connection ( ) . await ?;
8383
@@ -104,7 +104,7 @@ impl NodeStore {
104104 pub async fn update_node ( & self , node : DiscoveryNode ) -> Result < ( ) , Error > {
105105 let mut con = self . get_connection ( ) . await ?;
106106 let address = node. id . clone ( ) ;
107- let key = format ! ( "node:{}" , address ) ;
107+ let key = format ! ( "node:{address}" ) ;
108108 let serialized_node = serde_json:: to_string ( & node) ?;
109109
110110 let _: ( ) = redis:: pipe ( )
@@ -125,7 +125,7 @@ impl NodeStore {
125125 return Ok ( Vec :: new ( ) ) ;
126126 }
127127
128- let node_keys: Vec < String > = node_ids. iter ( ) . map ( |id| format ! ( "node:{}" , id ) ) . collect ( ) ;
128+ let node_keys: Vec < String > = node_ids. iter ( ) . map ( |id| format ! ( "node:{id}" ) ) . collect ( ) ;
129129
130130 let mut pipe = redis:: pipe ( ) ;
131131 for key in & node_keys {
@@ -138,7 +138,7 @@ impl NodeStore {
138138 let serialized_nodes = match serialized_nodes {
139139 Ok ( nodes) => nodes,
140140 Err ( e) => {
141- error ! ( "Error querying nodes from Redis: {}" , e ) ;
141+ error ! ( "Error querying nodes from Redis: {e}" ) ;
142142 return Err ( e. into ( ) ) ;
143143 }
144144 } ;
@@ -159,7 +159,7 @@ impl NodeStore {
159159
160160 pub async fn get_node_by_id ( & self , node_id : & str ) -> Result < Option < DiscoveryNode > , Error > {
161161 let mut con = self . get_connection ( ) . await ?;
162- let key = format ! ( "node:{}" , node_id ) ;
162+ let key = format ! ( "node:{node_id}" ) ;
163163
164164 let serialized_node: Option < String > = con. get ( & key) . await ?;
165165
0 commit comments