clippy: replace is_some+unwrap with if let in mcp bearer rewriter
ci / gates (push) Successful in 5s
ci / rust (push) Failing after 19s
ci / frontend (push) Successful in 25s
ci / e2e (push) Skipped
ci / publish (push) Skipped

Co-Authored-By: Claude Opus 4.7 <[email protected]>
This commit is contained in:
Omar Sobh
2026-07-18 14:47:04 -07:00
co-authored by Claude Opus 4.7
parent bffa790dbc
commit fd3ebb628a
+2 -2
View File
@@ -646,16 +646,16 @@ fn prewrite_daemon_config_with_risk(
} }
} }
if in_mcp_clawmates if in_mcp_clawmates
&& mcp_bearer_override.is_some()
&& trimmed.starts_with("headers") && trimmed.starts_with("headers")
&& trimmed.contains("Authorization") && trimmed.contains("Authorization")
{ {
let bearer = mcp_bearer_override.unwrap(); if let Some(bearer) = mcp_bearer_override {
out.push_str(&format!( out.push_str(&format!(
"headers = {{ Authorization = \"Bearer {bearer}\" }}\n" "headers = {{ Authorization = \"Bearer {bearer}\" }}\n"
)); ));
continue; continue;
} }
}
if in_agent_block && trimmed.starts_with("risk_profile = \"") { if in_agent_block && trimmed.starts_with("risk_profile = \"") {
if let Some(r) = &risk_replacement { if let Some(r) = &risk_replacement {
out.push_str(r); out.push_str(r);