mirror of
https://github.com/fafhrd91/actix-web
synced 2025-09-01 01:16:59 +02:00
cleanup deprecation warning for Box<dyn>
This commit is contained in:
@@ -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