From 41f6535a480bb9b0ff085e0144852827633f2305 Mon Sep 17 00:00:00 2001 From: Andy Wortman Date: Wed, 1 Nov 2017 04:31:43 -0700 Subject: move more logging to be through DisplayInfo statuses move DisplayInfo into ... display flush output, duh --- src/commands/look_up.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/commands/look_up.rs') diff --git a/src/commands/look_up.rs b/src/commands/look_up.rs index 701ce2d..dff56aa 100644 --- a/src/commands/look_up.rs +++ b/src/commands/look_up.rs @@ -12,10 +12,11 @@ pub static LOOK_UP_USER: Command = Command { }; fn look_up_user(line: String, tweeter: &mut tw::TwitterCache, mut queryer: &mut Queryer) { - if let Some(user) = tweeter.fetch_user(&line, &mut queryer) { - println!("{:?}", user); + // should probably just pass the id? + if let Some(user) = tweeter.fetch_user(&line, &mut queryer).map(|x| x.clone()) { + tweeter.display_info.recv(display::Infos::User(user)); } else { -// println!("Couldn't retrieve {}", userid); + tweeter.display_info.status(format!("Couldn't retrieve {}", line)); } } -- cgit v1.1