From c80bd698f8440cccee0d1fc230790ce25258f9f1 Mon Sep 17 00:00:00 2001 From: Marshall Bowers Date: Sat, 17 May 2025 12:23:08 +0200 Subject: [PATCH] language_models: Don't mark local subscription binding as unused (#30867) This PR removes an instance of marking a local `Subscription` binding as unused. While we `_` the field to prevent unused warnings, the locals shouldn't be marked as unused as we do use them (and want them to participate in usage tracking). Release Notes: - N/A --- crates/language_models/src/provider/copilot_chat.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/language_models/src/provider/copilot_chat.rs b/crates/language_models/src/provider/copilot_chat.rs index 5c962661789ef55f47460bb655a821ffc3972f14..25f97ffd5986226e966e68f043767b31c6232ed3 100644 --- a/crates/language_models/src/provider/copilot_chat.rs +++ b/crates/language_models/src/provider/copilot_chat.rs @@ -60,10 +60,10 @@ impl State { impl CopilotChatLanguageModelProvider { pub fn new(cx: &mut App) -> Self { let state = cx.new(|cx| { - let _copilot_chat_subscription = CopilotChat::global(cx) + let copilot_chat_subscription = CopilotChat::global(cx) .map(|copilot_chat| cx.observe(&copilot_chat, |_, _, cx| cx.notify())); State { - _copilot_chat_subscription, + _copilot_chat_subscription: copilot_chat_subscription, _settings_subscription: cx.observe_global::(|_, cx| { cx.notify(); }),