From 118a40e5df3d1f25412be73629d04f64f8b4dfa7 Mon Sep 17 00:00:00 2001 From: Marc Mettke Date: Sun, 1 Nov 2020 10:05:42 +0100 Subject: [PATCH] Correcting sync trait signature --- src/sync/mod.rs | 2 +- src/sync/requests.rs | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/sync/mod.rs b/src/sync/mod.rs index 520eaa58..920def90 100644 --- a/src/sync/mod.rs +++ b/src/sync/mod.rs @@ -9,7 +9,7 @@ pub mod requests; #[cfg(feature = "reqwest_blocking")] pub use self::requests::default_client; -use std::{borrow::Borrow, error}; +use std::error; /// Functionality for sending authenticated and unauthenticated requests to Slack via HTTP. /// diff --git a/src/sync/requests.rs b/src/sync/requests.rs index 7e908dad..6a507dc5 100644 --- a/src/sync/requests.rs +++ b/src/sync/requests.rs @@ -13,7 +13,7 @@ mod reqwest_support { impl SlackWebRequestSender for Client { type Error = reqwest::Error; - fn get( + fn get( &self, method_url: S, params: &[(&str, String)], @@ -28,7 +28,7 @@ mod reqwest_support { Ok(self.get(url).send()?.text()?) } - fn post( + fn post( &self, method_url: S, form: &[(&str, String)], @@ -41,7 +41,7 @@ mod reqwest_support { let mut req = self.post(url).form(form); for v in headers { let (k, v) = v.borrow(); - req = req.header(k.as_ref(), v.as_ref()); + req = req.header(*k, v); } Ok(req.send()?.text()?) }