Removed call to 'banner' from external modules
This commit is contained in:
@@ -1,11 +1,9 @@
|
||||
use crate::banner;
|
||||
use crate::persistence::pathfinder::Pathfinder;
|
||||
use crate::persistence::pemstore::PemStore;
|
||||
use clap::ArgMatches;
|
||||
use crypto::identity::MixnetIdentityKeyPair;
|
||||
|
||||
pub fn execute(matches: &ArgMatches) {
|
||||
println!("{}", banner());
|
||||
println!("Initialising client...");
|
||||
|
||||
let id = matches.value_of("id").unwrap().to_string(); // required for now
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
use crate::banner;
|
||||
use crate::clients::{NymClient, SocketType};
|
||||
use crate::persistence::pemstore;
|
||||
|
||||
@@ -7,8 +6,6 @@ use crypto::identity::{MixnetIdentityKeyPair, MixnetIdentityPublicKey};
|
||||
use std::net::ToSocketAddrs;
|
||||
|
||||
pub fn execute(matches: &ArgMatches) {
|
||||
println!("{}", banner());
|
||||
|
||||
let id = matches.value_of("id").unwrap().to_string();
|
||||
let port = match matches.value_of("port").unwrap_or("9001").parse::<u16>() {
|
||||
Ok(n) => n,
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
use crate::banner;
|
||||
use crate::clients::{NymClient, SocketType};
|
||||
use crate::persistence::pemstore;
|
||||
|
||||
@@ -7,8 +6,6 @@ use crypto::identity::{MixnetIdentityKeyPair, MixnetIdentityPublicKey};
|
||||
use std::net::ToSocketAddrs;
|
||||
|
||||
pub fn execute(matches: &ArgMatches) {
|
||||
println!("{}", banner());
|
||||
|
||||
let id = matches.value_of("id").unwrap().to_string();
|
||||
let port = match matches.value_of("port").unwrap_or("9001").parse::<u16>() {
|
||||
Ok(n) => n,
|
||||
|
||||
+12
-3
@@ -91,9 +91,18 @@ fn main() {
|
||||
|
||||
fn execute(matches: ArgMatches) -> Result<(), String> {
|
||||
match matches.subcommand() {
|
||||
("init", Some(m)) => Ok(commands::init::execute(m)),
|
||||
("tcpsocket", Some(m)) => Ok(commands::tcpsocket::execute(m)),
|
||||
("websocket", Some(m)) => Ok(commands::websocket::execute(m)),
|
||||
("init", Some(m)) => {
|
||||
println!("{}", banner());
|
||||
Ok(commands::init::execute(m))
|
||||
}
|
||||
("tcpsocket", Some(m)) => {
|
||||
println!("{}", banner());
|
||||
Ok(commands::tcpsocket::execute(m))
|
||||
}
|
||||
("websocket", Some(m)) => {
|
||||
println!("{}", banner());
|
||||
Ok(commands::websocket::execute(m))
|
||||
}
|
||||
_ => Err(usage()),
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user