From 5e0bf67a2e07ede9edc12466b4b2f194fef5a1df Mon Sep 17 00:00:00 2001
From: fakeshadow <24548779@qq.com>
Date: Sat, 2 Jan 2021 10:42:14 +0800
Subject: [PATCH] fix actix-web-actors build
---
Cargo.toml | 1 -
actix-web-actors/Cargo.toml | 2 +-
actix-web-actors/src/context.rs | 2 +-
actix-web-actors/src/ws.rs | 2 +-
4 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/Cargo.toml b/Cargo.toml
index b741ea252..221a0a326 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -131,7 +131,6 @@ actix-multipart = { path = "actix-multipart" }
actix-files = { path = "actix-files" }
awc = { path = "awc" }
-actix = { git = "https://github.com/actix/actix.git", branch = "master" }
actix-tls = { git = "https://github.com/actix/actix-net.git", branch = "master" }
actix-server = { git = "https://github.com/actix/actix-net.git", branch = "master" }
actix-service = { git = "https://github.com/actix/actix-net.git", branch = "master" }
diff --git a/actix-web-actors/Cargo.toml b/actix-web-actors/Cargo.toml
index 541d0de10..28b9d6fa2 100644
--- a/actix-web-actors/Cargo.toml
+++ b/actix-web-actors/Cargo.toml
@@ -22,9 +22,9 @@ actix-http = "2.0.0"
actix-web = { version = "3.0.0", default-features = false }
bytes = "1"
-futures-channel = { version = "0.3.7", default-features = false }
futures-core = { version = "0.3.7", default-features = false }
pin-project = "1.0.0"
+tokio = { version = "1", features = ["sync"] }
[dev-dependencies]
actix-rt = "2.0.0-beta.1"
diff --git a/actix-web-actors/src/context.rs b/actix-web-actors/src/context.rs
index 0839a4288..2dd93c727 100644
--- a/actix-web-actors/src/context.rs
+++ b/actix-web-actors/src/context.rs
@@ -12,8 +12,8 @@ use actix::{
};
use actix_web::error::Error;
use bytes::Bytes;
-use futures_channel::oneshot::Sender;
use futures_core::Stream;
+use tokio::sync::oneshot::Sender;
/// Execution context for http actors
pub struct HttpContext
diff --git a/actix-web-actors/src/ws.rs b/actix-web-actors/src/ws.rs
index 8fd03f6a1..9dd7bf500 100644
--- a/actix-web-actors/src/ws.rs
+++ b/actix-web-actors/src/ws.rs
@@ -24,8 +24,8 @@ use actix_web::error::{Error, PayloadError};
use actix_web::http::{header, Method, StatusCode};
use actix_web::{HttpRequest, HttpResponse};
use bytes::{Bytes, BytesMut};
-use futures_channel::oneshot::Sender;
use futures_core::Stream;
+use tokio::sync::oneshot::Sender;
/// Do websocket handshake and start ws actor.
pub fn start(actor: A, req: &HttpRequest, stream: T) -> Result