diff options
author | Andy Wortman <ixineeringeverywhere@gmail.com> | 2017-11-01 04:31:43 -0700 |
---|---|---|
committer | Andy Wortman <ixineeringeverywhere@gmail.com> | 2017-11-01 04:31:43 -0700 |
commit | 41f6535a480bb9b0ff085e0144852827633f2305 (patch) | |
tree | dd48118f712344d5dcea278148f3c82996f74021 /src/commands/look_up.rs | |
parent | bf7f5d32a7f05bb0a7bc19dcb443d3df439243ba (diff) |
move more logging to be through DisplayInfo statuses
move DisplayInfo into ... display
flush output, duh
Diffstat (limited to 'src/commands/look_up.rs')
-rw-r--r-- | src/commands/look_up.rs | 7 |
1 files changed, 4 insertions, 3 deletions
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)); } } |