style(clippy): auto-fix code style issues and unnecessary map_or allocations detected by cargo clippy
This commit is contained in:
1 parent
febd48c65d
commit
706e9ad172
9 files changed
+131
-74
No files matched your search
@@ -274,10 +274,9 @@ impl McpTool for ReadPreferencesHandler {
|
||||
}
|
||||
|
||||
async fn execute(&self, _args: Value, state: Arc<MemoryState>) -> Result<String, String> {
|
||||
let data = state
|
||||
state
|
||||
.prefs
|
||||
.read_with(|prefs| serde_json::to_string(prefs).map_err(|e| e.to_string()));
|
||||
data
|
||||
.read_with(|prefs| serde_json::to_string(prefs).map_err(|e| e.to_string()))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user