Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update actix_web to v4.0.0-beta15 and make actix handler work again #20

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ xmltree = "0.10.0"
hyper = {version = "0.14.0", optional = true }
warp = { version = "0.3.0", optional = true }
#actix-web = { version = "3.3.2", optional = true }
actix-web = { version = "4.0.0-beta.6", optional = true }
actix-web = { version = "4.0.0-beta.15", optional = true }

[dev-dependencies]
clap = "2.33.0"
Expand Down
6 changes: 4 additions & 2 deletions src/actix.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ use std::task::{Context, Poll};

use actix_web::error::PayloadError;
use actix_web::{dev, Error, FromRequest, HttpRequest, HttpResponse};
use actix_web::body::BoxBody;

use bytes::Bytes;
use futures::{future, Stream};
use pin_project::pin_project;
Expand All @@ -39,7 +41,6 @@ impl DavRequest {
}

impl FromRequest for DavRequest {
type Config = ();
type Error = Error;
type Future = future::Ready<Result<DavRequest, Error>>;

Expand Down Expand Up @@ -122,8 +123,9 @@ impl From<http::Response<crate::body::Body>> for DavResponse {
}

impl actix_web::Responder for DavResponse {
type Body = BoxBody;

fn respond_to(self, _req: &HttpRequest) -> HttpResponse {
fn respond_to(self, _req: &HttpRequest) -> HttpResponse<BoxBody> {
use crate::body::{Body, BodyType};

let (parts, body) = self.0.into_parts();
Expand Down