@@ -133,13 +133,13 @@ async fn ak_reconcile(
133133 client : Arc < Client > ,
134134) -> Result < Action , ControllerError > {
135135 let ak_name = ak. metadata . name . clone ( ) . unwrap_or_default ( ) ;
136- info ! ( "Attestation Key reconciliation for: {}" , ak_name ) ;
136+ info ! ( "Attestation Key reconciliation for: {ak_name}" ) ;
137137
138138 let client = Arc :: unwrap_or_clone ( client) ;
139139 let machines: Api < Machine > = Api :: default_namespaced ( client. clone ( ) ) ;
140140 let lp = ListParams :: default ( ) ;
141141 let machine_list: ObjectList < Machine > = machines. list ( & lp) . await . map_err ( |e| {
142- eprintln ! ( "Error fetching machine list: {}" , e ) ;
142+ eprintln ! ( "Error fetching machine list: {e}" ) ;
143143 ControllerError :: Anyhow ( e. into ( ) )
144144 } ) ?;
145145 for machine in & machine_list. items {
@@ -180,15 +180,15 @@ async fn machine_reconcile(
180180 let aks: Api < AttestationKey > = Api :: default_namespaced ( client. clone ( ) ) ;
181181 let lp = ListParams :: default ( ) ;
182182 let ak_list: ObjectList < AttestationKey > = aks. list ( & lp) . await . map_err ( |e| {
183- eprintln ! ( "Error fetching attestation key list: {}" , e ) ;
183+ eprintln ! ( "Error fetching attestation key list: {e}" ) ;
184184 ControllerError :: Anyhow ( e. into ( ) )
185185 } ) ?;
186186 for ak in ak_list. items {
187- if let Some ( ak_address) = & ak. spec . address {
188- if * ak_address == machine_address {
189- approve_ak ( & ak , & machine , client . clone ( ) ) . await ? ;
190- return Ok ( Action :: await_change ( ) ) ;
191- }
187+ if let Some ( ak_address) = & ak. spec . address
188+ && * ak_address == machine_address
189+ {
190+ approve_ak ( & ak , & machine , client . clone ( ) ) . await ? ;
191+ return Ok ( Action :: await_change ( ) ) ;
192192 }
193193 }
194194 Ok ( Action :: await_change ( ) )
@@ -313,10 +313,7 @@ async fn secret_reconcile(
313313 return Ok ( Action :: await_change ( ) ) ;
314314 }
315315
316- info ! (
317- "Secret reconciliation for AttestationKey secret: {}" ,
318- secret_name
319- ) ;
316+ info ! ( "Secret reconciliation for AttestationKey secret: {secret_name}" ) ;
320317
321318 let secrets: Api < Secret > = Api :: default_namespaced ( Arc :: unwrap_or_clone ( client. clone ( ) ) ) ;
322319 finalizer ( & secrets, ATTESTATION_KEY_SECRET_FINALIZER , secret, |ev| async move {
@@ -328,15 +325,14 @@ async fn secret_reconcile(
328325 . await
329326 . map ( |_| Action :: await_change ( ) )
330327 . map_err ( |e| {
331- eprintln ! ( "Error updating attestation key volumes on secret apply: {}" , e ) ;
328+ eprintln ! ( "Error updating attestation key volumes on secret apply: {e}" ) ;
332329 finalizer:: Error :: < ControllerError > :: ApplyFailed ( e. into ( ) )
333330 } )
334331 }
335332 Event :: Cleanup ( secret) => {
336333 let secret_name = secret. metadata . name . clone ( ) . unwrap_or_default ( ) ;
337334 info ! (
338- "AttestationKey secret {} is being deleted, updating trustee deployment volumes" ,
339- secret_name
335+ "AttestationKey secret {secret_name} is being deleted, updating trustee deployment volumes"
340336 ) ;
341337 let client = Arc :: unwrap_or_clone ( client) ;
342338 // Update trustee deployment - secrets with deletion_timestamp will be filtered out
@@ -345,8 +341,7 @@ async fn secret_reconcile(
345341 . map ( |_| Action :: await_change ( ) )
346342 . map_err ( |e| {
347343 eprintln ! (
348- "Error updating attestation key volumes during secret deletion: {}" ,
349- e
344+ "Error updating attestation key volumes during secret deletion: {e}"
350345 ) ;
351346 finalizer:: Error :: < ControllerError > :: CleanupFailed ( e. into ( ) )
352347 } )
0 commit comments