File tree Expand file tree Collapse file tree
rust/stackable-cockpit/src/utils/k8s Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -353,17 +353,19 @@ impl Client {
353353 )
354354 . await ?;
355355
356- if let Some ( objectlist) = objects {
357- for object in objectlist {
358- if let Some ( value) = object. labels ( ) . get ( & label. key ( ) . to_string ( ) ) {
359- if value. eq ( & label. value ( ) . to_string ( ) ) {
360- self . delete_object (
361- & object. metadata . name . unwrap ( ) ,
362- & api_resource,
363- object. metadata . namespace . as_deref ( ) ,
364- )
365- . await ?;
366- }
356+ let Some ( object_list) = objects else {
357+ continue ;
358+ } ;
359+
360+ for object in object_list {
361+ if let Some ( value) = object. labels ( ) . get ( & label. key ( ) . to_string ( ) ) {
362+ if value. eq ( & label. value ( ) . to_string ( ) ) {
363+ self . delete_object (
364+ & object. metadata . name . unwrap ( ) ,
365+ & api_resource,
366+ object. metadata . namespace . as_deref ( ) ,
367+ )
368+ . await ?;
367369 }
368370 }
369371 }
You can’t perform that action at this time.
0 commit comments