intermodal/src/subcommand.rs

15 lines
287 B
Rust
Raw Normal View History

2019-05-24 10:25:55 +02:00
use crate::common::*;
#[derive(StructOpt)]
pub(crate) enum Subcommand {
Torrent(Torrent),
}
impl Subcommand {
pub(crate) fn run(self, env: &Environment, unstable: bool) -> Result<(), Error> {
match self {
Self::Torrent(torrent) => torrent.run(env, unstable),
}
}
}