aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAkshay <[email protected]>2020-08-03 17:16:54 +0100
committerAkshay <[email protected]>2020-08-03 17:16:54 +0100
commit807f945a08e0ff28968194c098a0a05a6a79ba09 (patch)
tree8f56083739727a2f8965d10e92d853ae13572501 /src
parent5b4baacef870811401751417c4e72fd25e02e5a2 (diff)
don't write to stderr!
Diffstat (limited to 'src')
-rw-r--r--src/command.rs2
1 files changed, 0 insertions, 2 deletions
diff --git a/src/command.rs b/src/command.rs
index e4c099e..4f3e491 100644
--- a/src/command.rs
+++ b/src/command.rs
@@ -29,7 +29,6 @@ fn get_command_completion(prefix: &str) -> Option<String> {
29 29
30fn get_habit_completion(prefix: &str, habit_names: &[String]) -> Option<String> { 30fn get_habit_completion(prefix: &str, habit_names: &[String]) -> Option<String> {
31 let first_match = habit_names.iter().filter(|&x| x.starts_with(prefix)).next(); 31 let first_match = habit_names.iter().filter(|&x| x.starts_with(prefix)).next();
32 eprintln!("{:?}| {:?}", prefix, first_match);
33 return first_match.map(|x| x.into()); 32 return first_match.map(|x| x.into());
34} 33}
35 34
@@ -60,7 +59,6 @@ pub fn open_command_window(s: &mut Cursive) {
60 } else { 59 } else {
61 let word = contents.split(' ').last().unwrap(); 60 let word = contents.split(' ').last().unwrap();
62 let completion = get_habit_completion(word, &habit_list); 61 let completion = get_habit_completion(word, &habit_list);
63 eprintln!("{:?} | {:?}", completion, contents);
64 if let Some(c) = completion { 62 if let Some(c) = completion {
65 let cb = view.set_content(format!("{}", contents) + &c[word.len()..]); 63 let cb = view.set_content(format!("{}", contents) + &c[word.len()..]);
66 return Some(EventResult::Consumed(Some(cb))); 64 return Some(EventResult::Consumed(Some(cb)));