chore: Fix more warnings

This commit is contained in:
2025-04-24 13:14:35 -04:00
parent 80bdd0ee8a
commit 508b97ca7c
4 changed files with 10 additions and 12 deletions

View File

@@ -218,7 +218,7 @@ where
mod tests {
use super::*;
use crate::modules::dns::DnsScore;
use crate::topology::{self, HAClusterTopology};
use crate::topology::HAClusterTopology;
#[test]
fn test_format_values_as_string() {

View File

@@ -151,22 +151,20 @@ impl Topology for K8sAnywhereTopology {
}
async fn ensure_ready(&self) -> Result<Outcome, InterpretError> {
let k8s_state = self
let k8s_state = self
.k8s_state
.get_or_try_init(|| self.try_get_or_install_k8s_client())
.await?;
let k8s_state: &K8sState = k8s_state
.as_ref()
.ok_or(InterpretError::new(
"No K8s client could be found or installed".to_string(),
))?;
let k8s_state: &K8sState = k8s_state.as_ref().ok_or(InterpretError::new(
"No K8s client could be found or installed".to_string(),
))?;
match self.is_helm_available() {
Ok(()) => Ok(Outcome::success(format!(
"{} + helm available",
k8s_state.message.clone()
))),
"{} + helm available",
k8s_state.message.clone()
))),
Err(_) => Err(InterpretError::new("helm unavailable".to_string())),
}
}