From f6fd9e70f96039ccc6116414e475a21966765b01 Mon Sep 17 00:00:00 2001 From: Nathan Fox Date: Sat, 21 Apr 2018 16:53:55 -0400 Subject: [PATCH] code cleanup --- src/ws/frame.rs | 3 +-- src/ws/mod.rs | 1 - 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/src/ws/frame.rs b/src/ws/frame.rs index 07e592868..dfef26b0e 100644 --- a/src/ws/frame.rs +++ b/src/ws/frame.rs @@ -2,7 +2,6 @@ use byteorder::{BigEndian, ByteOrder, NetworkEndian}; use bytes::{BufMut, Bytes, BytesMut}; use futures::{Async, Poll, Stream}; use rand; -use std::iter::FromIterator; use std::{fmt, mem, ptr}; use body::Binary; @@ -30,7 +29,7 @@ impl Frame { /// Create a new Close control frame. #[inline] pub fn close(reason: Option, genmask: bool) -> Binary { - let payload:Vec = match reason { + let payload = match reason { None => Vec::new(), Some(reason) => { let mut code_bytes = [0; 2]; diff --git a/src/ws/mod.rs b/src/ws/mod.rs index 7db1cf3be..93fd431ca 100644 --- a/src/ws/mod.rs +++ b/src/ws/mod.rs @@ -43,7 +43,6 @@ //! # .finish(); //! # } //! ``` -use byteorder::{ByteOrder, NetworkEndian}; use bytes::Bytes; use futures::{Async, Poll, Stream}; use http::{header, Method, StatusCode};