plugins: lsps: remove debug print from library module
What changed, and why it matters
This commit simply removes a debug logging line from a Rust source file in the LSPS plugin. It is a code-cleanup change with no security relevance visible in the diff or commit message.
No security action required; treat as routine refactoring/cleanup.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The change removes an import of log::debug and a debug!() macro call that logged the response id when a JSON-RPC response was invalid (both result and error missing or both set). The functional behavior remains identical: the same Error::Rpc(RpcError::internal_error(...)) is still returned. No logic, parsing, authorization, or cryptographic code is modified.
Changed components
plugins/lsps-plugin/src/proto/jsonrpc.rsInspect captured patch +3 / −10
diff --git a/plugins/lsps-plugin/src/proto/jsonrpc.rs b/plugins/lsps-plugin/src/proto/jsonrpc.rs
index afc21140..cc194463 100644
--- a/plugins/lsps-plugin/src/proto/jsonrpc.rs
+++ b/plugins/lsps-plugin/src/proto/jsonrpc.rs
@@ -1,4 +1,3 @@
-use log::debug;
use serde::{de::DeserializeOwned, Deserialize, Serialize};
use serde_json::{self, Value};
use std::fmt;
@@ -94,15 +93,9 @@ where
match (resp.result, resp.error) {
(Some(result), None) => Ok(result),
(None, Some(error)) => Err(Error::Rpc(error)),
- _ => {
- debug!(
- "Invalid JSON-RPC response - missing both result and error fields, or both set: id={}",
- resp.id
- );
- Err(Error::Rpc(RpcError::internal_error(
- "not a valid json respone",
- )))
- }
+ _ => Err(Error::Rpc(RpcError::internal_error(
+ "not a valid json respone",
+ ))),
}
}
}
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.