1
0
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:
Nikolay Kim
2018-07-04 21:01:27 +06:00
parent 4c5a63965e
commit 6fd686ef98
39 changed files with 116 additions and 226 deletions

View File

@ -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;

View File

@ -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,

View File

@ -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]