From 9ba42eae46ab5a723684d3272a681cc310308e8d Mon Sep 17 00:00:00 2001 From: Jonathan Turner Date: Mon, 3 Jun 2019 12:03:40 +1200 Subject: [PATCH] Fix up tests --- Cargo.lock | 2 +- src/cli.rs | 4 +--- src/tests.rs | 2 +- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index d235b028d6..a57d95e081 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1168,7 +1168,7 @@ dependencies = [ [[package]] name = "nu" -version = "0.1.1" +version = "0.1.2" dependencies = [ "adhoc_derive 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "ansi_term 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", diff --git a/src/cli.rs b/src/cli.rs index 967e942ce4..a5f8ade5d4 100644 --- a/src/cli.rs +++ b/src/cli.rs @@ -78,9 +78,7 @@ pub async fn cli() -> Result<(), Box> { } rl.set_helper(Some(h)); - if rl.load_history("history.txt").is_err() { - println!("No previous history."); - } + let _ = rl.load_history("history.txt"); loop { let readline = rl.readline(&format!( diff --git a/src/tests.rs b/src/tests.rs index 25b027af5a..9910950d54 100644 --- a/src/tests.rs +++ b/src/tests.rs @@ -40,7 +40,7 @@ mod tests { match process.stdin.unwrap().write_all(input_commands.as_bytes()) { Err(why) => panic!("couldn't write to wc stdin: {}", why.description()), - Ok(_) => println!("sent pangram to wc"), + Ok(_) => {}, } let mut s = String::new();