From fee16d8474f8fe34a0543ad8cd50cb9a739c6713 Mon Sep 17 00:00:00 2001 From: Armin Friedl Date: Sun, 2 Feb 2020 09:01:01 +0100 Subject: [PATCH] [client] Parse hostname --- coffer-client/src/main.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/coffer-client/src/main.rs b/coffer-client/src/main.rs index 309cde4..6d215bd 100644 --- a/coffer-client/src/main.rs +++ b/coffer-client/src/main.rs @@ -18,8 +18,8 @@ use coffer_common::coffer::{CofferShard, CofferValue}; #[derive(StructOpt, Debug)] struct Args { /// Address of the coffer server - #[structopt(short, long, parse(try_from_str), env = "COFFER_SERVER_ADDRESS", default_value = "127.0.0.1:9187")] - server_address: SocketAddr, + #[structopt(short, long, env = "COFFER_SERVER_ADDRESS", default_value = "127.0.0.1:9187")] + server_address: String, #[structopt(short, long, parse(from_os_str), env = "COFFER_CLIENT_CERTIFICATE", hide_env_values = true)] certificate: PathBuf, @@ -39,7 +39,7 @@ fn main() -> Result<(), Box> { let cert = Certificate::new_from_cbor(&args.certificate)?; debug!{"Connecting to coffer server"} - let mut stream: TcpStream = TcpStream::connect(&args.server_address)?; + let mut stream: TcpStream = TcpStream::connect(args.server_address)?; debug!{"Sending hello"} let hello = framed(0x00, cert.public_key());