Skip to content

Commit 4673f79

Browse files
committed
fix(core): invert if-not-else to satisfy clippy::if_not_else
1 parent b0c2cea commit 4673f79

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

crates/mcpls-core/src/lib.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,9 @@ pub async fn serve(config: ServerConfig) -> Result<(), Error> {
147147
applicable_configs.len()
148148
);
149149

150-
if !applicable_configs.is_empty() {
150+
if applicable_configs.is_empty() {
151+
warn!("No applicable LSP servers configured — starting in protocol-only mode");
152+
} else {
151153
// Spawn all servers with graceful degradation
152154
let result = LspServer::spawn_batch(&applicable_configs).await;
153155

@@ -179,8 +181,6 @@ pub async fn serve(config: ServerConfig) -> Result<(), Error> {
179181
}
180182

181183
info!("Proceeding with {} LSP server(s)", server_count);
182-
} else {
183-
warn!("No applicable LSP servers configured — starting in protocol-only mode");
184184
}
185185

186186
let translator = Arc::new(Mutex::new(translator));

0 commit comments

Comments
 (0)