aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoriximeow <me@iximeow.net>2018-01-15 13:06:06 -0800
committeriximeow <me@iximeow.net>2018-01-15 13:06:06 -0800
commitdeb7dff15aaef57a6fb1ecefeba9bfd3d895d84d (patch)
tree2d7f0dae38e93df28ad3bb1254ae3381aee4da65
parentb81bbb7ea3684f7bd5eb39c3429f339a1d92721c (diff)
cleamup, remove unnecessary clone
-rw-r--r--src/commands/twete.rs5
1 files 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/{}",