separate rpc and cli bounds

This commit is contained in:
Aiden McClelland
2021-08-31 22:53:25 -06:00
parent 3195ffab68
commit b806e08866
5 changed files with 197 additions and 79 deletions

View File

@@ -195,16 +195,16 @@ fn cli_test() {
#[test]
#[ignore]
fn cli_example() {
run_cli!(
dothething::<String, _>,
app => app
run_cli! ({
command: dothething::<String, _>,
app: app => app
.arg(Arg::with_name("host").long("host").short("h").takes_value(true))
.arg(Arg::with_name("port").long("port").short("p").takes_value(true)),
matches => AppState(Arc::new(ConfigSeed {
context: matches => AppState(Arc::new(ConfigSeed {
host: Host::parse(matches.value_of("host").unwrap_or("localhost")).unwrap(),
port: matches.value_of("port").unwrap_or("8000").parse().unwrap(),
}))
)
})
}
////////////////////////////////////////////////