From 6b599f7a8e86d05f98808457b6b1db7e7cfa85ae Mon Sep 17 00:00:00 2001 From: ioanbudea-OAI Date: Mon, 30 Nov 2026 21:30:18 +0000 Subject: [PATCH] Use `then_some` for Notes metadata in the multi-environment MCP test (#64823) GitOrigin-RevId: 8fab548c5c06ec5b0f005872f0b98d6c2d93fcbd --- codex-rs/core/tests/suite/scenarios_multi_environment_mcp.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/codex-rs/core/tests/suite/scenarios_multi_environment_mcp.rs b/codex-rs/core/tests/suite/scenarios_multi_environment_mcp.rs index d160ad0767..f3ad9dc8fd 100644 --- a/codex-rs/core/tests/suite/scenarios_multi_environment_mcp.rs +++ b/codex-rs/core/tests/suite/scenarios_multi_environment_mcp.rs @@ -41,7 +41,8 @@ impl codex_extension_api::ToolLifecycleContributor for NotesMetadata { _turn: &codex_extension_api::ExtensionData, tool: &codex_extension_api::McpToolContext, ) -> Option<(&'static str, Value)> { - (tool.plugin_id.as_deref() == Some("env-a:notes")).then(|| ("x-notes-preview", json!(true))) + (tool.plugin_id.as_deref() == Some("env-a:notes")) + .then_some(("x-notes-preview", json!(true))) } fn on_mcp_tool_result<'a>(