use super::Cmd; use crate::Path; use clap::Command; use std::{error::Error, process}; pub struct False { name: &'static str, path: Option, } pub const FALSE: False = False { name: "false", path: Some(Path::Bin), }; impl Cmd for False { fn name(&self) -> &str { self.name } fn cli(&self) -> clap::Command { Command::new(self.name) .about("Does nothing unsuccessfully") .long_about("Exit with a status code indicating failure") .author("Nathan Fisher") .version(env!("CARGO_PKG_VERSION")) } fn run(&self, _matches: Option<&clap::ArgMatches>) -> Result<(), Box> { process::exit(1); } fn path(&self) -> Option { self.path } }