Follow reqwest change
This commit is contained in:
@@ -366,7 +366,7 @@ pub trait FromId<C>: Sized {
|
||||
) -> Result<Self::Object, (Option<serde_json::Value>, Self::Error)> {
|
||||
request::get(id, Self::get_sender(), proxy)
|
||||
.map_err(|_| (None, InboxError::DerefError))
|
||||
.and_then(|mut r| {
|
||||
.and_then(|r| {
|
||||
let json: serde_json::Value = r
|
||||
.json()
|
||||
.map_err(|_| (None, InboxError::InvalidObject(None)))?;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
use activitypub::{Activity, Link, Object};
|
||||
use array_tool::vec::Uniq;
|
||||
use reqwest::{header::HeaderValue, ClientBuilder, Url};
|
||||
use reqwest::{blocking::ClientBuilder, header::HeaderValue, Url};
|
||||
use rocket::{
|
||||
http::Status,
|
||||
request::{FromRequest, Request},
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
use chrono::{offset::Utc, DateTime};
|
||||
use openssl::hash::{Hasher, MessageDigest};
|
||||
use reqwest::{
|
||||
blocking::{ClientBuilder, Response},
|
||||
header::{
|
||||
HeaderMap, HeaderValue, InvalidHeaderValue, ACCEPT, CONTENT_TYPE, DATE, HOST, USER_AGENT,
|
||||
},
|
||||
ClientBuilder, Proxy, Response, Url, UrlError,
|
||||
Proxy, Url,
|
||||
};
|
||||
use std::ops::Deref;
|
||||
use std::time::SystemTime;
|
||||
@@ -18,8 +19,8 @@ const PLUME_USER_AGENT: &str = concat!("Plume/", env!("CARGO_PKG_VERSION"));
|
||||
#[derive(Debug)]
|
||||
pub struct Error();
|
||||
|
||||
impl From<UrlError> for Error {
|
||||
fn from(_err: UrlError) -> Self {
|
||||
impl From<url::ParseError> for Error {
|
||||
fn from(_err: url::ParseError) -> Self {
|
||||
Error()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user