From deb7dff15aaef57a6fb1ecefeba9bfd3d895d84d Mon Sep 17 00:00:00 2001 From: iximeow Date: Mon, 15 Jan 2018 13:06:06 -0800 Subject: cleamup, remove unnecessary clone --- src/commands/twete.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/commands/twete.rs b/src/commands/twete.rs index eded0db..0f3b6a5 100644 --- a/src/commands/twete.rs +++ b/src/commands/twete.rs @@ -202,8 +202,7 @@ fn rep(line: String, tweeter: &mut tw::TwitterCache, queryer: &mut Queryer, disp } pub fn send_reply(text: String, twid: TweetId, tweeter: &mut tw::TwitterCache, queryer: &mut Queryer, user_creds: tw::Credential, display_info: &mut DisplayInfo) { - if let Some(twete) = tweeter.retrieve_tweet(&twid).map(|x| x.clone()) { // TODO: no clone when this stops taking &mut self - let substituted = ::url_encode(&text); + if let Some(twete) = tweeter.retrieve_tweet(&twid) { let result = match tweeter.current_profile() { Some(user_profile) => { queryer.do_api_post( @@ -242,7 +241,7 @@ fn quote(line: String, tweeter: &mut tw::TwitterCache, queryer: &mut Queryer, di let maybe_id = TweetId::parse(id_str.to_owned()); match maybe_id { Ok(twid) => { - if let Some(twete) = tweeter.retrieve_tweet(&twid).map(|x| x.clone()) { // TODO: no clone when this stops taking &mut self + if let Some(twete) = tweeter.retrieve_tweet(&twid) { let attachment_url = &format!( "https://www.twitter.com/{}/status/{}", -- cgit v1.1