mirror of
https://github.com/actix/actix-extras.git
synced 2025-07-01 12:15:08 +02:00
cleanup warnings
This commit is contained in:
@ -23,8 +23,8 @@ use httpmessage::HttpMessage;
|
||||
use payload::PayloadHelper;
|
||||
|
||||
use client::{
|
||||
ClientConnector, ClientRequest, ClientRequestBuilder, ClientResponse,
|
||||
HttpResponseParserError, Pipeline, SendRequest, SendRequestError,
|
||||
ClientConnector, ClientRequest, ClientRequestBuilder, HttpResponseParserError,
|
||||
Pipeline, SendRequest, SendRequestError,
|
||||
};
|
||||
|
||||
use super::frame::Frame;
|
||||
|
@ -92,7 +92,7 @@ where
|
||||
{
|
||||
#[inline]
|
||||
/// Create a new Websocket context from a request and an actor
|
||||
pub fn new<P>(req: HttpRequest<S>, actor: A, stream: WsStream<P>) -> Body
|
||||
pub fn create<P>(req: HttpRequest<S>, actor: A, stream: WsStream<P>) -> Body
|
||||
where
|
||||
A: StreamHandler<Message, ProtocolError>,
|
||||
P: Stream<Item = Bytes, Error = PayloadError> + 'static,
|
||||
|
@ -45,7 +45,7 @@ use bytes::Bytes;
|
||||
use futures::{Async, Poll, Stream};
|
||||
use http::{header, Method, StatusCode};
|
||||
|
||||
use super::actix::{Actor, AsyncContext, StreamHandler};
|
||||
use super::actix::{Actor, StreamHandler};
|
||||
|
||||
use body::Binary;
|
||||
use error::{Error, PayloadError, ResponseError};
|
||||
@ -179,7 +179,7 @@ where
|
||||
let mut resp = handshake(req)?;
|
||||
let stream = WsStream::new(req.payload());
|
||||
|
||||
let body = WebsocketContext::new(req.clone(), actor, stream);
|
||||
let body = WebsocketContext::create(req.clone(), actor, stream);
|
||||
Ok(resp.body(body))
|
||||
}
|
||||
|
||||
@ -357,10 +357,8 @@ pub trait WsWriter {
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use std::str::FromStr;
|
||||
|
||||
use super::*;
|
||||
use http::{header, HeaderMap, Method, Uri, Version};
|
||||
use http::{header, Method};
|
||||
use test::TestRequest;
|
||||
|
||||
#[test]
|
||||
|
Reference in New Issue
Block a user