ffsend/src/cmd/matcher/history.rs

20 lines
445 B
Rust

use clap::ArgMatches;
use super::Matcher;
/// The history command matcher.
pub struct HistoryMatcher<'a> {
#[allow(unused)]
matches: &'a ArgMatches<'a>,
}
impl<'a> Matcher<'a> for HistoryMatcher<'a> {
fn with(matches: &'a ArgMatches) -> Option<Self> {
matches.subcommand_matches("history")
.map(|matches|
HistoryMatcher {
matches,
}
)
}
}