aboutsummaryrefslogtreecommitdiff
path: root/src/commands/look_up.rs
diff options
context:
space:
mode:
authoriximeow <me@iximeow.net>2017-11-01 04:31:43 -0700
committeriximeow <me@iximeow.net>2017-11-01 04:31:43 -0700
commit96425724b0e435c33876f4dd9685aed2bbdea1fd (patch)
treedd48118f712344d5dcea278148f3c82996f74021 /src/commands/look_up.rs
parentc40aa2bf95131317e2a9b199afd0b34ae2d847ee (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.rs7
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));
}
}