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