From ad054cadb5923073a4c3e5bd96f1d3110fc71447 Mon Sep 17 00:00:00 2001 From: Josh Holmer Date: Mon, 20 Jul 2020 20:23:04 -0400 Subject: [PATCH] Fix new clippy lint --- src/error.rs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/error.rs b/src/error.rs index dc81cfa7..0198379f 100644 --- a/src/error.rs +++ b/src/error.rs @@ -1,9 +1,8 @@ use std::error::Error; use std::fmt; -// TODO: Use `#[non_exhaustive]` once stabilized -// https://github.com/rust-lang/rust/issues/44109 #[derive(Debug, Clone)] +#[non_exhaustive] pub enum PngError { DeflatedDataTooLong(usize), TimedOut, @@ -13,8 +12,6 @@ pub enum PngError { TruncatedData, ChunkMissing(&'static str), Other(Box), - #[doc(hidden)] - _Nonexhaustive, } impl Error for PngError { @@ -38,7 +35,6 @@ impl fmt::Display for PngError { PngError::APNGNotSupported => f.write_str("APNG files are not (yet) supported"), PngError::ChunkMissing(s) => write!(f, "Chunk {} missing or empty", s), PngError::Other(ref s) => f.write_str(s), - PngError::_Nonexhaustive => unreachable!(), } } }