/
githubmirror
/
sway
Обзор
Документация
Войти
/
githubmirror
/
sway
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
forc/src/cli/commands/clean.rs
24 строки
687 B
César D. Rodas
Improve cli_examples macro (#5589)
10 фев 2024, 06:54
Не верифицирован
10 фев 2024, 06:54
7bcac37
Код
Авторство
О чём код?
use crate::ops::forc_clean; use clap::Parser; use forc_util::ForcResult; forc_util::cli_examples! { crate::cli::Opt { [Clean project => "forc clean"] [Clean project with a custom path => "forc clean --path <PATH>"] } } /// Removes the default forc compiler output artifact directory, i.e. `<project-name>/out`. #[derive(Debug, Parser)] #[clap(bin_name = "forc clean", version, after_help = help())] pub struct Command { /// Path to the project, if not specified, current working directory will be used. #[clap(short, long)] pub path: Option<String>, } pub fn exec(command: Command) -> ForcResult<()> { forc_clean::clean(command)?; Ok(()) }