From 96425724b0e435c33876f4dd9685aed2bbdea1fd Mon Sep 17 00:00:00 2001 From: iximeow 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/follow.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/commands/follow.rs') diff --git a/src/commands/follow.rs b/src/commands/follow.rs index ad121e5..b0dc8a7 100644 --- a/src/commands/follow.rs +++ b/src/commands/follow.rs @@ -14,7 +14,10 @@ pub static UNFOLLOW: Command = Command { fn unfl(line: String, tweeter: &mut tw::TwitterCache, queryer: &mut Queryer) { let screen_name = line.trim(); - queryer.do_api_post(&format!("{}?screen_name={}", FOLLOW_URL, screen_name)); + match queryer.do_api_post(&format!("{}?screen_name={}", FOLLOW_URL, screen_name)) { + Ok(_resp) => (), + Err(e) => tweeter.display_info.status(format!("unfl request error: {}", e)) + } } pub static FOLLOW: Command = Command { @@ -25,5 +28,5 @@ pub static FOLLOW: Command = Command { fn fl(line: String, tweeter: &mut tw::TwitterCache, queryer: &mut Queryer) { let screen_name = line.trim(); - println!("fl resp: {:?}", queryer.do_api_post(&format!("{}?screen_name={}", UNFOLLOW_URL, screen_name))); + tweeter.display_info.status(format!("fl resp: {:?}", queryer.do_api_post(&format!("{}?screen_name={}", UNFOLLOW_URL, screen_name)))); } -- cgit v1.1