style(clippy): clean up the two lints in phase3 new code
QC smoke sweep flagged two clippy -D warnings lints in code this branch introduced: - crates/core/src/process_watch.rs — collapsible_if on the meeting-pattern match loop, merged the two conditions with &&. - crates/mcp/src/lib.rs — let-else on the id unwrap that short-circuits a notification, switched to ? since handle_message already returns Option. All other clippy lints under -D warnings (audio/capture, hotkey/linux, storage/file_storage, diagnostics, the duplicate-detection helpers in live.rs) predate this branch and are out of scope. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -33,10 +33,10 @@ pub fn match_meeting_patterns(process_names: &[String], patterns: &[String]) ->
|
|||||||
if needle.is_empty() {
|
if needle.is_empty() {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if process_names.iter().any(|name| name.contains(&needle)) {
|
if process_names.iter().any(|name| name.contains(&needle))
|
||||||
if !matches.iter().any(|existing| existing == &needle) {
|
&& !matches.iter().any(|existing| existing == &needle)
|
||||||
matches.push(needle);
|
{
|
||||||
}
|
matches.push(needle);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
matches
|
matches
|
||||||
|
|||||||
@@ -59,9 +59,7 @@ pub async fn handle_message(pool: &SqlitePool, raw: Value) -> Option<JsonRpcResp
|
|||||||
};
|
};
|
||||||
|
|
||||||
// Notifications: no id, no response.
|
// Notifications: no id, no response.
|
||||||
let Some(id) = request.id.clone() else {
|
let id = request.id.clone()?;
|
||||||
return None;
|
|
||||||
};
|
|
||||||
|
|
||||||
let outcome = match request.method.as_str() {
|
let outcome = match request.method.as_str() {
|
||||||
"initialize" => Ok(initialize_result()),
|
"initialize" => Ok(initialize_result()),
|
||||||
|
|||||||
Reference in New Issue
Block a user