From 1fdae07aa66b298db23cb5f85b41da4a4f0c539b Mon Sep 17 00:00:00 2001 From: Benedikt Peetz Date: Thu, 24 Jul 2025 16:23:01 +0200 Subject: fix(crates/yt/commands): Add the actual `implm` wrapper --- crates/yt/src/commands/implm.rs | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 crates/yt/src/commands/implm.rs diff --git a/crates/yt/src/commands/implm.rs b/crates/yt/src/commands/implm.rs new file mode 100644 index 0000000..238ef28 --- /dev/null +++ b/crates/yt/src/commands/implm.rs @@ -0,0 +1,25 @@ +use std::sync::Arc; + +use crate::commands::Command; + +use anyhow::Result; + +impl Command { + pub(crate) async fn implm(self, app: crate::app::App) -> Result<()> { + match self { + Command::Config { cmd } => cmd.implm(&app)?, + Command::Database { cmd } => cmd.implm(&app).await?, + Command::Download { cmd } => cmd.implm(Arc::new(app)).await?, + Command::Playlist { cmd } => cmd.implm(&app).await?, + Command::Select { cmd } => { cmd.unwrap_or_default().implm(&app).await?; } + Command::Show { cmd } => cmd.implm(&app).await?, + Command::Status { cmd } => cmd.implm(&app).await?, + Command::Subscriptions { cmd } => cmd.implm(&app).await?, + Command::Update { cmd } => cmd.implm(&app).await?, + Command::Videos { cmd } => cmd.implm(&app).await?, + Command::Watch { cmd } => cmd.implm(Arc::new(app)).await?, + } + + Ok(()) + } +} -- cgit 1.4.1