Remove opinionated Display impl for file::Class

This type derives Debug, so you can "{:?}" format it to get a string like ELF32/ELF64,
which is intuitive to me. If someone wants some other human readable format, they can implement
it themselves.
This commit is contained in:
Christopher Cole 2022-11-12 12:12:49 -08:00
parent 2e05d70302
commit 4875ff8981
No known key found for this signature in database
GPG Key ID: 0AC856975983E9DB

View File

@ -10,16 +10,6 @@ pub enum Class {
ELF64,
}
impl core::fmt::Display for Class {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
let str = match self {
Class::ELF32 => "32-bit",
Class::ELF64 => "64-bit",
};
write!(f, "{}", str)
}
}
/// Encapsulates the contents of the ELF File Header
///
/// The ELF File Header starts off every ELF file and both identifies the