diff --git a/node/tools/src/k8s.rs b/node/tools/src/k8s.rs index 19e90040..f53bfa12 100644 --- a/node/tools/src/k8s.rs +++ b/node/tools/src/k8s.rs @@ -361,13 +361,12 @@ where Fut: std::future::Future>, { let mut interval = time::interval(delay); - let mut count = 0; - loop { + for count in 0.. { interval.tick().await; - count += 1; let result = f().await; if result.is_ok() || count > retries { return result; } } + unreachable!("Loop sould always return") }