mirror of
https://github.com/fafhrd91/actix-web
synced 2025-07-01 08:45:10 +02:00
cleanup deprecation warning for Box<dyn>
This commit is contained in:
@ -73,7 +73,7 @@ where
|
||||
{
|
||||
type Config = FormConfig;
|
||||
type Error = Error;
|
||||
type Future = Box<Future<Item = Self, Error = Error>>;
|
||||
type Future = Box<dyn Future<Item = Self, Error = Error>>;
|
||||
|
||||
#[inline]
|
||||
fn from_request(req: &HttpRequest, payload: &mut Payload) -> Self::Future {
|
||||
@ -187,7 +187,7 @@ pub struct UrlEncoded<U> {
|
||||
length: Option<usize>,
|
||||
encoding: &'static Encoding,
|
||||
err: Option<UrlencodedError>,
|
||||
fut: Option<Box<Future<Item = U, Error = UrlencodedError>>>,
|
||||
fut: Option<Box<dyn Future<Item = U, Error = UrlencodedError>>>,
|
||||
}
|
||||
|
||||
impl<U> UrlEncoded<U> {
|
||||
|
@ -169,7 +169,7 @@ where
|
||||
T: DeserializeOwned + 'static,
|
||||
{
|
||||
type Error = Error;
|
||||
type Future = Box<Future<Item = Self, Error = Error>>;
|
||||
type Future = Box<dyn Future<Item = Self, Error = Error>>;
|
||||
type Config = JsonConfig;
|
||||
|
||||
#[inline]
|
||||
@ -290,7 +290,7 @@ pub struct JsonBody<U> {
|
||||
length: Option<usize>,
|
||||
stream: Option<Decompress<Payload>>,
|
||||
err: Option<JsonPayloadError>,
|
||||
fut: Option<Box<Future<Item = U, Error = JsonPayloadError>>>,
|
||||
fut: Option<Box<dyn Future<Item = U, Error = JsonPayloadError>>>,
|
||||
}
|
||||
|
||||
impl<U> JsonBody<U>
|
||||
|
@ -124,7 +124,7 @@ impl FromRequest for Bytes {
|
||||
type Config = PayloadConfig;
|
||||
type Error = Error;
|
||||
type Future =
|
||||
Either<Box<Future<Item = Bytes, Error = Error>>, FutureResult<Bytes, Error>>;
|
||||
Either<Box<dyn Future<Item = Bytes, Error = Error>>, FutureResult<Bytes, Error>>;
|
||||
|
||||
#[inline]
|
||||
fn from_request(req: &HttpRequest, payload: &mut dev::Payload) -> Self::Future {
|
||||
@ -177,8 +177,10 @@ impl FromRequest for Bytes {
|
||||
impl FromRequest for String {
|
||||
type Config = PayloadConfig;
|
||||
type Error = Error;
|
||||
type Future =
|
||||
Either<Box<Future<Item = String, Error = Error>>, FutureResult<String, Error>>;
|
||||
type Future = Either<
|
||||
Box<dyn Future<Item = String, Error = Error>>,
|
||||
FutureResult<String, Error>,
|
||||
>;
|
||||
|
||||
#[inline]
|
||||
fn from_request(req: &HttpRequest, payload: &mut dev::Payload) -> Self::Future {
|
||||
@ -291,7 +293,7 @@ pub struct HttpMessageBody {
|
||||
length: Option<usize>,
|
||||
stream: Option<dev::Decompress<dev::Payload>>,
|
||||
err: Option<PayloadError>,
|
||||
fut: Option<Box<Future<Item = Bytes, Error = PayloadError>>>,
|
||||
fut: Option<Box<dyn Future<Item = Bytes, Error = PayloadError>>>,
|
||||
}
|
||||
|
||||
impl HttpMessageBody {
|
||||
|
Reference in New Issue
Block a user