mirror of
https://github.com/Llewellynvdm/zoxide.git
synced 2024-05-29 05:40:48 +00:00
29 lines
518 B
Rust
29 lines
518 B
Rust
mod add;
|
|
mod cmd;
|
|
mod edit;
|
|
mod import;
|
|
mod init;
|
|
mod query;
|
|
mod remove;
|
|
|
|
use anyhow::Result;
|
|
|
|
pub use crate::cmd::cmd::*;
|
|
|
|
pub trait Run {
|
|
fn run(&self) -> Result<()>;
|
|
}
|
|
|
|
impl Run for Cmd {
|
|
fn run(&self) -> Result<()> {
|
|
match self {
|
|
Cmd::Add(cmd) => cmd.run(),
|
|
Cmd::Edit(cmd) => cmd.run(),
|
|
Cmd::Import(cmd) => cmd.run(),
|
|
Cmd::Init(cmd) => cmd.run(),
|
|
Cmd::Query(cmd) => cmd.run(),
|
|
Cmd::Remove(cmd) => cmd.run(),
|
|
}
|
|
}
|
|
}
|