refactor(http1): updated Encoder/Decoder match with the matches macro (#2368)

This commit is contained in:
Pankaj Chaudhary
2020-12-23 00:20:57 +05:30
committed by GitHub
parent 6c593c2925
commit 3b3077da1f
3 changed files with 4 additions and 13 deletions

View File

@@ -68,10 +68,7 @@ impl Encoder {
}
pub fn is_eof(&self) -> bool {
match self.kind {
Kind::Length(0) => true,
_ => false,
}
matches!(self.kind, Kind::Length(0))
}
#[cfg(feature = "server")]