mirror of
https://github.com/panpaul/tiny_os
synced 2024-09-20 09:45:19 +08:00
chore: cpio: add debug formatter for Entry
This commit is contained in:
parent
6b770c4aea
commit
d89a21648f
@ -151,6 +151,17 @@ impl Entry {
|
||||
}
|
||||
}
|
||||
|
||||
impl core::fmt::Debug for Entry {
|
||||
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
|
||||
f.debug_struct("Entry")
|
||||
.field("filename", &self.filename())
|
||||
.field("file_size", &self.file_size())
|
||||
.field("is_tailer", &self.is_trailer())
|
||||
.field("is_valid", &self.is_valid())
|
||||
.finish()
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a> Reader<'a> {
|
||||
pub fn new(data: &'a [u8]) -> Self {
|
||||
Reader { data }
|
||||
|
Loading…
Reference in New Issue
Block a user