This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//! Extend `argh` to be better integrated with the `cargo` ecosystem | |
//! | |
//! For now, this only adds a --version/-V option which causes early-exit. | |
use argh::{FromArgs, TopLevelCommand}; | |
struct ArgsOrVersion<T: FromArgs>(T); | |
impl<T> argh::TopLevelCommand for ArgsOrVersion<T> where T: FromArgs {} | |
impl<T> FromArgs for ArgsOrVersion<T> | |
where | |
T: FromArgs, |