mirror of
https://github.com/actix/actix-extras.git
synced 2025-07-01 12:15:08 +02:00
remove unneed Send and Sync
This commit is contained in:
@ -445,20 +445,13 @@ impl fmt::Debug for ClientReader {
|
||||
}
|
||||
}
|
||||
|
||||
impl ClientReader {
|
||||
#[inline]
|
||||
fn as_mut(&mut self) -> &mut Inner {
|
||||
unsafe { &mut *self.inner.get() }
|
||||
}
|
||||
}
|
||||
|
||||
impl Stream for ClientReader {
|
||||
type Item = Message;
|
||||
type Error = ProtocolError;
|
||||
|
||||
fn poll(&mut self) -> Poll<Option<Self::Item>, Self::Error> {
|
||||
let max_size = self.max_size;
|
||||
let inner = self.as_mut();
|
||||
let inner: &mut Inner = unsafe { &mut *self.inner.get() };
|
||||
if inner.closed {
|
||||
return Ok(Async::Ready(None));
|
||||
}
|
||||
@ -521,18 +514,14 @@ impl ClientWriter {
|
||||
/// Write payload
|
||||
#[inline]
|
||||
fn write(&mut self, mut data: Binary) {
|
||||
if !self.as_mut().closed {
|
||||
let _ = self.as_mut().tx.unbounded_send(data.take());
|
||||
let inner: &mut Inner = unsafe { &mut *self.inner.get() };
|
||||
if !inner.closed {
|
||||
let _ = inner.tx.unbounded_send(data.take());
|
||||
} else {
|
||||
warn!("Trying to write to disconnected response");
|
||||
}
|
||||
}
|
||||
|
||||
#[inline]
|
||||
fn as_mut(&mut self) -> &mut Inner {
|
||||
unsafe { &mut *self.inner.get() }
|
||||
}
|
||||
|
||||
/// Send text frame
|
||||
#[inline]
|
||||
pub fn text<T: Into<Binary>>(&mut self, text: T) {
|
||||
|
Reference in New Issue
Block a user