diff options
author | Vika <vika@fireburn.ru> | 2022-02-21 22:47:06 +0300 |
---|---|---|
committer | Vika <vika@fireburn.ru> | 2022-02-21 22:47:06 +0300 |
commit | 55ba0a507bd310e3b04ac23e0311666968c2e1f1 (patch) | |
tree | 1da3a850a0e5da0a0dd4e307236bef14b8520052 /src/indieauth.rs | |
parent | 987ef5045023bcf7b6b843684f62db55f7c142d2 (diff) | |
download | kittybox-55ba0a507bd310e3b04ac23e0311666968c2e1f1.tar.zst |
Small tweaks, additions and preparations
Diffstat (limited to 'src/indieauth.rs')
-rw-r--r-- | src/indieauth.rs | 12 |
1 files changed, 3 insertions, 9 deletions
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<impl hyper::client::connect::Connect + Clone + Send + Sync + 'static, hyper::Body> { - 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] |