Fix SMG service discovery Clippy lint (#26034)

This commit is contained in:
Mohammad Miadh Angkad
2026-05-22 10:51:13 +08:00
committed by GitHub
parent 7c02ca7882
commit 76b1efaffd
+6 -7
View File
@@ -113,13 +113,12 @@ impl PodInfo {
pub fn should_include(pod: &Pod, config: &ServiceDiscoveryConfig) -> bool {
if config.pd_mode {
if config.prefill_selector.is_empty() && config.decode_selector.is_empty() {
if !(config.igw_mode && !config.selector.is_empty()) {
warn!(
"PD mode enabled but both prefill_selector and decode_selector are empty"
);
return false;
}
if config.prefill_selector.is_empty()
&& config.decode_selector.is_empty()
&& (!config.igw_mode || config.selector.is_empty())
{
warn!("PD mode enabled but both prefill_selector and decode_selector are empty");
return false;
}
let matches_pd = Self::matches_selector(pod, &config.prefill_selector)
|| Self::matches_selector(pod, &config.decode_selector);