Mark enum Context and Error as non_exhaustive.

This commit is contained in:
KAMADA Ken'ichi 2019-12-22 20:33:56 +09:00
parent 9e4c996cdf
commit f90f5d885a
2 changed files with 2 additions and 0 deletions

View File

@ -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),

View File

@ -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)