Skip to content

Commit 6b30f56

Browse files
authored
chore: bump rust-version to 1.89 (#96)
* chore: bump rust-version to 1.89 * fix: resolve clippy 1.89 lints (collapsible_if, dead_code) * fix: resolve remaining clippy 1.89 lints in feature-gated code * fix: last collapsible_if in storage.rs (inotify block) * fix: remaining clippy 1.89 lints (unwrap_err, collapsible_if in tests)
1 parent cf18e7c commit 6b30f56

50 files changed

Lines changed: 896 additions & 940 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.claude/settings.local.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,8 @@
111111
"Bash(python3 -c \"import sys,json; d=json.load\\(sys.stdin\\); [print\\(p[''''name''''], p[''''version'''']\\) for p in d[''''packages''''] if p[''''name'''']==''''rmcp'''']\")",
112112
"Bash(python3 -c \"import json,sys; d=json.load\\(sys.stdin\\); [print\\(p[''''name''''], p[''''version'''']\\) for p in d[''''packages''''] if p[''''name'''']==''''rmcp'''']\")",
113113
"Bash(git push:*)",
114-
"Bash(gh pr:*)"
114+
"Bash(gh pr:*)",
115+
"Bash(do head:*)"
115116
],
116117
"deny": []
117118
}

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ resolver = "2"
2626

2727
[workspace.package]
2828
version = "0.17.0"
29-
rust-version = "1.88"
29+
rust-version = "1.89"
3030
edition = "2024"
3131
license = "MIT OR Apache-2.0"
3232
authors = ["PulseEngine Contributors"]

conformance-tests/src/main.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -163,14 +163,14 @@ fn list_servers() -> Result<()> {
163163
let entry = entry?;
164164
let path = entry.path();
165165

166-
if path.extension().and_then(|s| s.to_str()) == Some("json") {
167-
if let Some(name) = path.file_stem().and_then(|s| s.to_str()) {
168-
// Try to load config to get description
169-
if let Ok(config) = ServerConfig::load(&path) {
170-
println!(" {} - {}", name.green(), config.description);
171-
} else {
172-
println!(" {name}");
173-
}
166+
if path.extension().and_then(|s| s.to_str()) == Some("json")
167+
&& let Some(name) = path.file_stem().and_then(|s| s.to_str())
168+
{
169+
// Try to load config to get description
170+
if let Ok(config) = ServerConfig::load(&path) {
171+
println!(" {} - {}", name.green(), config.description);
172+
} else {
173+
println!(" {name}");
174174
}
175175
}
176176
}

conformance-tests/src/runner.rs

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -107,10 +107,10 @@ impl ConformanceRunner {
107107

108108
// Copy conformance results if they exist
109109
let conformance_results = PathBuf::from("results");
110-
if conformance_results.exists() {
111-
if let Err(e) = copy_dir_all(&conformance_results, &self.results_dir) {
112-
eprintln!("{} Failed to copy conformance results: {}", "⚠".yellow(), e);
113-
}
110+
if conformance_results.exists()
111+
&& let Err(e) = copy_dir_all(&conformance_results, &self.results_dir)
112+
{
113+
eprintln!("{} Failed to copy conformance results: {}", "⚠".yellow(), e);
114114
}
115115

116116
// Generate summary
@@ -172,12 +172,11 @@ impl ConformanceRunner {
172172
if failures > 0 {
173173
println!("{} Failed checks:", "⚠".yellow());
174174
for check in checks_array {
175-
if check["status"] == "FAILURE" {
176-
if let (Some(name), Some(desc)) =
175+
if check["status"] == "FAILURE"
176+
&& let (Some(name), Some(desc)) =
177177
(check["name"].as_str(), check["description"].as_str())
178-
{
179-
println!(" - {name}: {desc}");
180-
}
178+
{
179+
println!(" - {name}: {desc}");
181180
}
182181
}
183182
}

integration-tests/src/cli_server_integration.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#![allow(dead_code)]
12
//! Integration tests for CLI and server interaction
23
34
use crate::test_utils::*;

integration-tests/src/end_to_end_scenarios.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#![allow(dead_code)]
12
//! End-to-end integration scenarios that test the complete MCP framework
23
34
use crate::test_utils::*;

integration-tests/src/monitoring_integration.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#![allow(dead_code)]
12
//! Integration tests for monitoring across multiple components
23
34
use crate::test_utils::*;

integration-tests/src/transport_server_integration.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#![allow(dead_code)]
12
//! Integration tests for transport and server interaction
23
34
use crate::test_utils::*;

mcp-external-validation/src/config.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -295,12 +295,12 @@ impl ValidationConfig {
295295
});
296296
}
297297

298-
if let Some(ref url) = self.jsonrpc.validator_url {
299-
if !url.starts_with("http") {
300-
return Err(ValidationError::ConfigurationError {
301-
message: "JSON-RPC validator URL must start with http or https".to_string(),
302-
});
303-
}
298+
if let Some(ref url) = self.jsonrpc.validator_url
299+
&& !url.starts_with("http")
300+
{
301+
return Err(ValidationError::ConfigurationError {
302+
message: "JSON-RPC validator URL must start with http or https".to_string(),
303+
});
304304
}
305305

306306
// Validate port ranges

mcp-external-validation/src/cross_language.rs

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -216,25 +216,25 @@ impl CrossLanguageTester {
216216
let python_commands = ["python3", "python"];
217217

218218
for cmd in &python_commands {
219-
if let Ok(output) = Command::new(cmd).arg("--version").output() {
220-
if output.status.success() {
221-
let version = String::from_utf8_lossy(&output.stdout).trim().to_string();
222-
223-
// Check if MCP package is available
224-
let sdk_check = Command::new(cmd)
225-
.args(&["-c", "import mcp; print('available')"])
226-
.output();
227-
228-
let sdk_available = sdk_check.map(|o| o.status.success()).unwrap_or(false);
229-
230-
return Ok(LanguageRuntime {
231-
language: Language::Python,
232-
executable: cmd.to_string(),
233-
version,
234-
sdk_available,
235-
test_scripts_dir: Some(std::env::temp_dir().join("mcp_python_cross_tests")),
236-
});
237-
}
219+
if let Ok(output) = Command::new(cmd).arg("--version").output()
220+
&& output.status.success()
221+
{
222+
let version = String::from_utf8_lossy(&output.stdout).trim().to_string();
223+
224+
// Check if MCP package is available
225+
let sdk_check = Command::new(cmd)
226+
.args(&["-c", "import mcp; print('available')"])
227+
.output();
228+
229+
let sdk_available = sdk_check.map(|o| o.status.success()).unwrap_or(false);
230+
231+
return Ok(LanguageRuntime {
232+
language: Language::Python,
233+
executable: cmd.to_string(),
234+
version,
235+
sdk_available,
236+
test_scripts_dir: Some(std::env::temp_dir().join("mcp_python_cross_tests")),
237+
});
238238
}
239239
}
240240

@@ -828,17 +828,17 @@ async function testMcpCrossLanguage(serverUrl, protocolVersion) {{
828828
if needs_setup {
829829
match language {
830830
Language::Python => {
831-
if let Some(runtime) = self.available_languages.get_mut(&language) {
832-
if let Err(e) = Self::setup_python_environment(runtime).await {
833-
warn!("Failed to setup Python environment: {}", e);
834-
}
831+
if let Some(runtime) = self.available_languages.get_mut(&language)
832+
&& let Err(e) = Self::setup_python_environment(runtime).await
833+
{
834+
warn!("Failed to setup Python environment: {}", e);
835835
}
836836
}
837837
Language::JavaScript | Language::TypeScript => {
838-
if let Some(runtime) = self.available_languages.get_mut(&language) {
839-
if let Err(e) = Self::setup_javascript_environment(runtime).await {
840-
warn!("Failed to setup JavaScript environment: {}", e);
841-
}
838+
if let Some(runtime) = self.available_languages.get_mut(&language)
839+
&& let Err(e) = Self::setup_javascript_environment(runtime).await
840+
{
841+
warn!("Failed to setup JavaScript environment: {}", e);
842842
}
843843
}
844844
_ => {

0 commit comments

Comments
 (0)