From 3ff8a09528b085027daf40cc55e4884e42957c9e Mon Sep 17 00:00:00 2001 From: Justin Geibel Date: Wed, 23 Oct 2019 18:36:32 -0400 Subject: [PATCH] Remove two redundant clones identified by clippy nightly --- src/controllers.rs | 2 +- src/tests/util.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/controllers.rs b/src/controllers.rs index dc80fcf803d..0bf1cfca13c 100644 --- a/src/controllers.rs +++ b/src/controllers.rs @@ -56,7 +56,7 @@ mod prelude { } fn query_with_params(&self, new_params: IndexMap) -> String { - let mut params = self.query().clone(); + let mut params = self.query(); params.extend(new_params); let query_string = url::form_urlencoded::Serializer::new(String::new()) .extend_pairs(params) diff --git a/src/tests/util.rs b/src/tests/util.rs index 6a9d3bf30f3..65d9e7466e6 100644 --- a/src/tests/util.rs +++ b/src/tests/util.rs @@ -529,7 +529,7 @@ impl MockTokenUser { { let url = format!("/api/v1/crates/{}/owners", krate_name); let body = json!({ "owners": owners }).to_string(); - method(&self, &url, body.to_string().as_bytes()) + method(&self, &url, body.as_bytes()) } /// Add a user as an owner for a crate.