From 55ba0a507bd310e3b04ac23e0311666968c2e1f1 Mon Sep 17 00:00:00 2001 From: Vika Date: Mon, 21 Feb 2022 22:47:06 +0300 Subject: Small tweaks, additions and preparations --- src/indieauth.rs | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) (limited to 'src/indieauth.rs') diff --git a/src/indieauth.rs b/src/indieauth.rs index bcc8bbe..4dfe11d 100644 --- a/src/indieauth.rs +++ b/src/indieauth.rs @@ -184,7 +184,7 @@ where T: hyper::client::connect::Connect + Clone + Send + Sync + 'static { }, _ => Err(IndieAuthError { source: None, - msg: format!("Token endpoint returned {}", res.status()).to_string(), + msg: format!("Token endpoint returned {}", res.status()), kind: ErrorKind::TokenEndpointError }.into()) }, @@ -210,15 +210,9 @@ mod tests { assert!(!user.check_scope("delete")); } + #[inline] fn get_http_client() -> hyper::Client { - let builder = hyper::Client::builder(); - let https = hyper_rustls::HttpsConnectorBuilder::new() - .with_webpki_roots() - .https_or_http() - .enable_http1() - .enable_http2() - .build(); - builder.build(https) + hyper::Client::new() } #[tokio::test] -- cgit 1.4.1