clippy: replace is_some+unwrap with if let in mcp bearer rewriter
Co-Authored-By: Claude Opus 4.7 <[email protected]>
This commit is contained in:
co-authored by
Claude Opus 4.7
parent
bffa790dbc
commit
fd3ebb628a
@@ -646,15 +646,15 @@ 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 {
|
||||||
|
|||||||
Reference in New Issue
Block a user