aboutsummaryrefslogtreecommitdiff
path: root/src/commands/fav.rs
diff options
context:
space:
mode:
authoriximeow <me@iximeow.net>2017-11-30 03:07:05 -0800
committeriximeow <me@iximeow.net>2017-11-30 03:07:05 -0800
commitb1863d07efbb2cc4672c0d6f6143738a122d6720 (patch)
tree99a5d9f19b3031e068a3ce833ea59656b484a3e7 /src/commands/fav.rs
parenta35d4e09ce619fef3b53e24c8f9c04043ef3b6d5 (diff)
remove unneeded params, adjust id display
tweets are now recorded with the date they are recieved at dated id lookup is now supported tweet ids, where displayed, are displayed in a convenient form: if the tweet was recieved today, show the today id if the tweet was recieved on a different day, show the bare id many instances where display_info was passed for logging information, the parameter has become unnecessary, so it's gone now
Diffstat (limited to 'src/commands/fav.rs')
-rw-r--r--src/commands/fav.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/commands/fav.rs b/src/commands/fav.rs
index 0bee8ce..5e5f2a2 100644
--- a/src/commands/fav.rs
+++ b/src/commands/fav.rs
@@ -21,7 +21,7 @@ fn unfav(line: String, tweeter: &mut tw::TwitterCache, queryer: &mut Queryer, di
let maybe_id = TweetId::parse(line.to_owned());
match maybe_id {
Ok(twid) => {
- if let Some(twete) = tweeter.retrieve_tweet(&twid, display_info).map(|x| x.clone()) { // TODO: no clone when this stops taking &mut self
+ if let Some(twete) = tweeter.retrieve_tweet(&twid).map(|x| x.clone()) { // TODO: no clone when this stops taking &mut self
let result = match tweeter.current_profile() {
Some(user_profile) => queryer.do_api_post(&format!("{}?id={}", UNFAV_TWEET_URL, twete.id), &tweeter.app_key, &user_profile.creds),
None => Err("No logged in user to unfav from".to_owned())
@@ -53,7 +53,7 @@ fn fav(line: String, tweeter: &mut tw::TwitterCache, queryer: &mut Queryer, disp
match maybe_id {
Ok(twid) => {
// tweeter.to_twitter_tweet_id(twid)...
- if let Some(twete) = tweeter.retrieve_tweet(&twid, display_info).map(|x| x.clone()) { // TODO: no clone when this stops taking &mut self
+ if let Some(twete) = tweeter.retrieve_tweet(&twid).map(|x| x.clone()) { // TODO: no clone when this stops taking &mut self
let result = match tweeter.current_profile() {
Some(user_profile) => queryer.do_api_post(&format!("{}?id={}", FAV_TWEET_URL, twete.id), &tweeter.app_key, &user_profile.creds),
None => Err("No logged in user to fav from".to_owned())