Fix warnings

This commit is contained in:
Carl Lerche
2017-08-24 15:52:01 -07:00
parent 638791ac6c
commit b0e6867877
26 changed files with 91 additions and 238 deletions

View File

@@ -1,7 +1,7 @@
use hpack;
use error::{ConnectionError, Reason};
use bytes::{Bytes, Buf};
use bytes::Bytes;
use std::fmt;
@@ -56,6 +56,8 @@ pub use self::settings::{
DEFAULT_MAX_FRAME_SIZE,
};
pub type FrameSize = u32;
pub const HEADER_LEN: usize = 9;
pub enum Frame<T = Bytes> {
@@ -100,18 +102,6 @@ impl<T> Frame<T> {
}
}
impl<T: Buf> Frame<T> {
/// Returns the length of the frame as it applies to flow control.
pub fn flow_len(&self) -> usize {
use self::Frame::*;
match *self {
Data(ref frame) => frame.payload().remaining(),
_ => 0,
}
}
}
impl<T> fmt::Debug for Frame<T> {
fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
use self::Frame::*;