rustutils_true/lib.rs
1use clap::Parser;
2use rustutils_runnable::Runnable;
3use std::error::Error;
4
5/// Exit with a status code indicating success.
6#[derive(Parser, Clone, Debug)]
7#[clap(author, version, about, long_about = None)]
8pub struct True {}
9
10impl Runnable for True {
11 fn run(&self) -> Result<(), Box<dyn Error>> {
12 Ok(())
13 }
14}
15
16#[test]
17fn can_run_successfully() {
18 let cmd = True {};
19 assert!(cmd.run().is_ok());
20}