From d7727c83093f63dac04faccffb8774dbde901a52 Mon Sep 17 00:00:00 2001 From: Sean Bowe Date: Sat, 24 Sep 2016 01:06:41 -0600 Subject: [PATCH] Trim the newline from prompt. --- src/dvd.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dvd.rs b/src/dvd.rs index 560303f..6c66fd7 100644 --- a/src/dvd.rs +++ b/src/dvd.rs @@ -24,7 +24,7 @@ pub fn prompt(s: &str) -> String { if io::stdin().read_line(&mut input).is_ok() { println!("Please wait..."); - return input; + return (&input[0..input.len()-1]).into(); } } }