aboutsummaryrefslogtreecommitdiff
path: root/src/display
diff options
context:
space:
mode:
authorAndy Wortman <ixineeringeverywhere@gmail.com>2017-10-18 22:28:28 -0700
committerAndy Wortman <ixineeringeverywhere@gmail.com>2017-10-18 22:28:28 -0700
commitb31cd05328e78f01ec053a8ff60b6db8a92891a1 (patch)
treeec11fd55c8e0323d76d632fb23d996305cf6580b /src/display
parent2f2a76aab3f23baaf9a47a72b7660a64e2e156dc (diff)
lots of tiny tweaks
escape more stuff avoid possible breakage if we dont have the fav of a retweet
Diffstat (limited to 'src/display')
-rw-r--r--src/display/mod.rs7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/display/mod.rs b/src/display/mod.rs
index aaca4b2..15e23d7 100644
--- a/src/display/mod.rs
+++ b/src/display/mod.rs
@@ -62,8 +62,11 @@ impl Render for tw::events::Event {
},
tw::events::Event::Fav_RT { user_id, twete_id } => {
println!("---------------------------------");
- let user = tweeter.retrieve_user(&user_id).unwrap();
- println!(" +rt_fav : {} (@{})", user.name, user.handle);
+ if let Some(user) = tweeter.retrieve_user(&user_id) {
+ println!(" +rt_fav : {} (@{})", user.name, user.handle);
+ } else {
+ println!(" +rt_fav but don't know who {} is", user_id);
+ }
render_twete(&twete_id, tweeter);
},
tw::events::Event::Fav { user_id, twete_id } => {