mirror of
https://github.com/actix/actix-extras.git
synced 2024-11-24 07:53:00 +01:00
code cleanup
This commit is contained in:
parent
de8a09254d
commit
f6fd9e70f9
@ -2,7 +2,6 @@ use byteorder::{BigEndian, ByteOrder, NetworkEndian};
|
|||||||
use bytes::{BufMut, Bytes, BytesMut};
|
use bytes::{BufMut, Bytes, BytesMut};
|
||||||
use futures::{Async, Poll, Stream};
|
use futures::{Async, Poll, Stream};
|
||||||
use rand;
|
use rand;
|
||||||
use std::iter::FromIterator;
|
|
||||||
use std::{fmt, mem, ptr};
|
use std::{fmt, mem, ptr};
|
||||||
|
|
||||||
use body::Binary;
|
use body::Binary;
|
||||||
@ -30,7 +29,7 @@ impl Frame {
|
|||||||
/// Create a new Close control frame.
|
/// Create a new Close control frame.
|
||||||
#[inline]
|
#[inline]
|
||||||
pub fn close(reason: Option<CloseReason>, genmask: bool) -> Binary {
|
pub fn close(reason: Option<CloseReason>, genmask: bool) -> Binary {
|
||||||
let payload:Vec<u8> = match reason {
|
let payload = match reason {
|
||||||
None => Vec::new(),
|
None => Vec::new(),
|
||||||
Some(reason) => {
|
Some(reason) => {
|
||||||
let mut code_bytes = [0; 2];
|
let mut code_bytes = [0; 2];
|
||||||
|
@ -43,7 +43,6 @@
|
|||||||
//! # .finish();
|
//! # .finish();
|
||||||
//! # }
|
//! # }
|
||||||
//! ```
|
//! ```
|
||||||
use byteorder::{ByteOrder, NetworkEndian};
|
|
||||||
use bytes::Bytes;
|
use bytes::Bytes;
|
||||||
use futures::{Async, Poll, Stream};
|
use futures::{Async, Poll, Stream};
|
||||||
use http::{header, Method, StatusCode};
|
use http::{header, Method, StatusCode};
|
||||||
|
Loading…
Reference in New Issue
Block a user