From 861cb077208ca1594c15e828b10f5865b0d60235 Mon Sep 17 00:00:00 2001 From: MikeCamel Date: Mon, 7 Sep 2020 15:30:46 +0100 Subject: [PATCH] Minor syntax changes to pass tests. --- src/main.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/main.rs b/src/main.rs index f4861d1..a849d7f 100644 --- a/src/main.rs +++ b/src/main.rs @@ -69,7 +69,7 @@ async fn main() { } fn create_new_runtime(recvd_data: &[u8]) { - format!("About to attempt new runtime creation"); + println!("About to attempt new runtime creation"); let _ = env_logger::try_init_from_env(env_logger::Env::default()); //TODO - get args these from main() if required // let args = std::env::args().skip(1); @@ -104,8 +104,8 @@ fn get_credentials_bytes() -> (Vec, Vec) { //implementation for file system fn get_cert_bytes_fs() -> Vec { let in_path = Path::new("key-material/server.crt"); - - let in_contents = match std::fs::read(in_path) { + let in_contents: Vec; + in_contents = match std::fs::read(in_path) { Ok(in_contents) => { println!("Contents = of {} bytes", &in_contents.len()); in_contents @@ -122,8 +122,8 @@ fn get_cert_bytes_fs() -> Vec { fn get_key_bytes_fs() -> Vec { println!("Generating server key (PEM)"); let in_path = Path::new("key-material/server.key"); - - let in_contents = match std::fs::read(in_path) { + let in_contents: Vec; + in_contents = match std::fs::read(in_path) { Ok(in_contents) => { println!("Contents = of {} bytes", &in_contents.len()); in_contents