aboutsummaryrefslogtreecommitdiff
path: root/src/commands/look_up.rs
diff options
context:
space:
mode:
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));
}
}