diff options
author | Benedikt Peetz <benedikt.peetz@b-peetz.de> | 2025-07-24 16:23:01 +0200 |
---|---|---|
committer | Benedikt Peetz <benedikt.peetz@b-peetz.de> | 2025-07-24 16:23:01 +0200 |
commit | 1fdae07aa66b298db23cb5f85b41da4a4f0c539b (patch) | |
tree | c12e5f980800fb2660199b5f83908cb907e4e0bf /crates | |
parent | refactor(crates/colors): Don't expose the custom colours module (diff) | |
download | yt-1fdae07aa66b298db23cb5f85b41da4a4f0c539b.zip |
fix(crates/yt/commands): Add the actual `implm` wrapper
Diffstat (limited to 'crates')
-rw-r--r-- | crates/yt/src/commands/implm.rs | 25 |
1 files changed, 25 insertions, 0 deletions
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(()) + } +} |