From 4875ff89812e52a78af5e22677f83be77618021d Mon Sep 17 00:00:00 2001 From: Christopher Cole Date: Sat, 12 Nov 2022 12:12:49 -0800 Subject: [PATCH] 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. --- src/file.rs | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/src/file.rs b/src/file.rs index 19b2714..5ace1a3 100644 --- a/src/file.rs +++ b/src/file.rs @@ -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