Skip to content

Commit

Permalink
don't write to stderr!
Browse files Browse the repository at this point in the history
  • Loading branch information
oppiliappan committed Aug 3, 2020
1 parent 5b4baac commit 807f945
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions src/command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ fn get_command_completion(prefix: &str) -> Option<String> {

fn get_habit_completion(prefix: &str, habit_names: &[String]) -> Option<String> {
let first_match = habit_names.iter().filter(|&x| x.starts_with(prefix)).next();
eprintln!("{:?}| {:?}", prefix, first_match);
return first_match.map(|x| x.into());
}

Expand Down Expand Up @@ -60,7 +59,6 @@ pub fn open_command_window(s: &mut Cursive) {
} else {
let word = contents.split(' ').last().unwrap();
let completion = get_habit_completion(word, &habit_list);
eprintln!("{:?} | {:?}", completion, contents);
if let Some(c) = completion {
let cb = view.set_content(format!("{}", contents) + &c[word.len()..]);
return Some(EventResult::Consumed(Some(cb)));
Expand Down

0 comments on commit 807f945

Please sign in to comment.