diff options
| author | acdenisSK <[email protected]> | 2017-07-29 22:53:50 +0200 |
|---|---|---|
| committer | acdenisSK <[email protected]> | 2017-07-29 22:53:50 +0200 |
| commit | 0d6965f647396c84b2570e92b63244c3afaea863 (patch) | |
| tree | 497cb26d44af5deca9afbe5ef9395d27aa3c9a8d /src/http | |
| parent | Fix imports (diff) | |
| download | serenity-0d6965f647396c84b2570e92b63244c3afaea863.tar.xz serenity-0d6965f647396c84b2570e92b63244c3afaea863.zip | |
Remove a few clones
Diffstat (limited to 'src/http')
| -rw-r--r-- | src/http/mod.rs | 2 | ||||
| -rw-r--r-- | src/http/ratelimiting.rs | 3 |
2 files changed, 2 insertions, 3 deletions
diff --git a/src/http/mod.rs b/src/http/mod.rs index 0efea78..7692961 100644 --- a/src/http/mod.rs +++ b/src/http/mod.rs @@ -1658,7 +1658,7 @@ pub fn send_files<'a, T>(channel_id: u64, files: Vec<T>, map: JsonMap) -> Result .set(header::UserAgent(constants::USER_AGENT.to_owned())); let mut request = Multipart::from_request(request)?; - let mut file_num = String::from("0".to_owned()); + let mut file_num = "0".to_owned(); for file in files { match file.into() { diff --git a/src/http/ratelimiting.rs b/src/http/ratelimiting.rs index f0eb8fc..dad5f7e 100644 --- a/src/http/ratelimiting.rs +++ b/src/http/ratelimiting.rs @@ -370,8 +370,7 @@ pub(crate) fn perform<'a, F>(route: Route, f: F) -> Result<Response> remaining: i64::MAX, reset: i64::MAX, })) - }) - .clone(); + }).clone(); let mut lock = bucket.lock().unwrap(); lock.pre_hook(&route); |