1
0
mirror of https://github.com/actix/actix-extras.git synced 2025-06-26 02:19:22 +02:00

remove unsafe cell from ws client

This commit is contained in:
Nikolay Kim
2018-06-19 09:36:17 +06:00
parent 261ad31b9a
commit 362b14c2f7
3 changed files with 9 additions and 10 deletions

View File

@ -317,9 +317,6 @@ impl Pipeline {
if self.conn.is_none() {
return Ok(Async::Ready(None));
}
let conn: &mut Connection =
unsafe { &mut *(self.conn.as_mut().unwrap() as *mut _) };
let mut need_run = false;
// need write?
@ -337,6 +334,9 @@ impl Pipeline {
// need read?
if self.parser.is_some() {
let conn: &mut Connection =
unsafe { &mut *(self.conn.as_mut().unwrap() as *mut _) };
loop {
match self
.parser