use super::Cmd; use crate::Path; use clap::Command; use std::{error::Error, process}; #[derive(Debug)] pub struct False { name: &'static str, path: Option, } impl Default for False { fn default() -> Self { Self { name: "false", path: Some(crate::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") } fn run(&self, _matches: Option<&clap::ArgMatches>) -> Result<(), Box> { process::exit(1); } fn path(&self) -> Option { self.path } }