From c9ac7b8e350ca9e736377315bbcf4b43f32f7110 Mon Sep 17 00:00:00 2001 From: Marshall Bowers Date: Mon, 1 Jul 2024 15:33:47 -0400 Subject: [PATCH] assistant: Remove unused `NowPlaceholder` (#13713) This PR removes the `NowPlaceholder` component, as it was no longer used. Release Notes: - N/A --- .../src/slash_command/now_command.rs | 24 ++----------------- 1 file changed, 2 insertions(+), 22 deletions(-) diff --git a/crates/assistant/src/slash_command/now_command.rs b/crates/assistant/src/slash_command/now_command.rs index 4275a9efef215f944dd84a5bb6bea4180ca1b700..108a43027eddc3dd379143d443e655d5be9b3c93 100644 --- a/crates/assistant/src/slash_command/now_command.rs +++ b/crates/assistant/src/slash_command/now_command.rs @@ -3,10 +3,10 @@ use std::sync::Arc; use anyhow::Result; use assistant_slash_command::{SlashCommand, SlashCommandOutput, SlashCommandOutputSection}; -use chrono::{DateTime, Local}; +use chrono::Local; use gpui::{AppContext, Task, WeakView}; use language::LspAdapterDelegate; -use ui::{prelude::*, ButtonLike, ElevationIndex}; +use ui::prelude::*; use workspace::Workspace; pub(crate) struct NowSlashCommand; @@ -60,23 +60,3 @@ impl SlashCommand for NowSlashCommand { })) } } - -#[derive(IntoElement)] -struct NowPlaceholder { - pub id: ElementId, - pub unfold: Arc, - pub now: DateTime, -} - -impl RenderOnce for NowPlaceholder { - fn render(self, _cx: &mut WindowContext) -> impl IntoElement { - let unfold = self.unfold; - - ButtonLike::new(self.id) - .style(ButtonStyle::Filled) - .layer(ElevationIndex::ElevatedSurface) - .child(Icon::new(IconName::CountdownTimer)) - .child(Label::new(self.now.to_rfc3339())) - .on_click(move |_, cx| unfold(cx)) - } -}