This commit is contained in:
John Smith
2021-11-28 20:08:50 -05:00
parent 4ffe259ad1
commit 1c576876ef
6 changed files with 41 additions and 64 deletions

View File

@@ -18,22 +18,13 @@ pub enum ConnectionState {
}
impl ConnectionState {
pub fn is_disconnected(&self) -> bool {
match *self {
Self::Disconnected => true,
_ => false,
}
matches!(*self, Self::Disconnected)
}
pub fn is_connected(&self) -> bool {
match *self {
Self::Connected(_, _) => true,
_ => false,
}
matches!(*self, Self::Connected(_, _))
}
pub fn is_retrying(&self) -> bool {
match *self {
Self::Retrying(_, _) => true,
_ => false,
}
matches!(*self, Self::Retrying(_, _))
}
}

View File

@@ -13,13 +13,12 @@ mod command_processor;
mod settings;
mod ui;
#[allow(clippy::all)]
pub mod veilid_client_capnp {
include!(concat!(env!("OUT_DIR"), "/proto/veilid_client_capnp.rs"));
}
fn parse_command_line<'a>(
default_config_path: &'a OsStr,
) -> Result<clap::ArgMatches<'a>, clap::Error> {
fn parse_command_line(default_config_path: &OsStr) -> Result<clap::ArgMatches, clap::Error> {
let matches = App::new("veilid-cli")
.version("0.1")
.about("Veilid Console Client")