From f90f5d885a5a53a8758f02d9c16c8c94cfb6472a Mon Sep 17 00:00:00 2001 From: KAMADA Ken'ichi Date: Sun, 22 Dec 2019 20:33:56 +0900 Subject: [PATCH] Mark enum Context and Error as non_exhaustive. --- src/error.rs | 1 + src/tag.rs | 1 + 2 files changed, 2 insertions(+) diff --git a/src/error.rs b/src/error.rs index af3b4e4..977b9a6 100644 --- a/src/error.rs +++ b/src/error.rs @@ -30,6 +30,7 @@ use std::io; /// An error type returned when parsing Exif data. #[derive(Debug)] +#[non_exhaustive] pub enum Error { /// Input data was malformed or truncated. InvalidFormat(&'static str), diff --git a/src/tag.rs b/src/tag.rs index fed9611..0c5e332 100644 --- a/src/tag.rs +++ b/src/tag.rs @@ -109,6 +109,7 @@ impl fmt::Display for Tag { /// An enum that indicates how a tag number is interpreted. #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)] +#[non_exhaustive] pub enum Context { /// TIFF attributes defined in the TIFF Rev. 6.0 specification. Tiff, // 0th/1st IFD (toplevel)