Add DebugFlags helper, improve format of HEADERS and SETTINGS frames
This commit is contained in:
@@ -225,16 +225,9 @@ impl From<DataFlags> for u8 {
|
||||
|
||||
impl fmt::Debug for DataFlags {
|
||||
fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
|
||||
let mut f = fmt.debug_struct("DataFlags");
|
||||
|
||||
if self.is_end_stream() {
|
||||
f.field("end_stream", &true);
|
||||
}
|
||||
|
||||
if self.is_padded() {
|
||||
f.field("padded", &true);
|
||||
}
|
||||
|
||||
f.finish()
|
||||
util::debug_flags(fmt, self.0)
|
||||
.flag_if(self.is_end_stream(), "END_STREAM")
|
||||
.flag_if(self.is_padded(), "PADDED")
|
||||
.finish()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user