Skip to content

Commit 67469bf

Browse files
committed
lib: Hint and Object are now non-exhaustive
1 parent 6d664c0 commit 67469bf

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/lib.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,8 @@
5151
//! Object::Archive(archive) => {
5252
//! println!("archive: {:#?}", &archive);
5353
//! },
54-
//! Object::Unknown(magic) => { println!("unknown magic: {:#x}", magic) }
54+
//! Object::Unknown(magic) => { println!("unknown magic: {:#x}", magic) },
55+
//! _ => { }
5556
//! }
5657
//! }
5758
//! }
@@ -221,6 +222,7 @@ pub struct HintData {
221222
}
222223

223224
#[derive(Debug)]
225+
#[non_exhaustive]
224226
/// A hint at the underlying binary format for 16 bytes of arbitrary data
225227
pub enum Hint {
226228
Elf(HintData),
@@ -281,6 +283,7 @@ if_everything! {
281283

282284
#[derive(Debug)]
283285
#[allow(clippy::large_enum_variant)]
286+
#[non_exhaustive]
284287
/// A parseable object that goblin understands
285288
pub enum Object<'a> {
286289
/// An ELF32/ELF64!

0 commit comments

Comments
 (0)