Fix new clippy lint
This commit is contained in:
parent
6d2756dc49
commit
ad054cadb5
1 changed files with 1 additions and 5 deletions
|
|
@ -1,9 +1,8 @@
|
||||||
use std::error::Error;
|
use std::error::Error;
|
||||||
use std::fmt;
|
use std::fmt;
|
||||||
|
|
||||||
// TODO: Use `#[non_exhaustive]` once stabilized
|
|
||||||
// https://github.com/rust-lang/rust/issues/44109
|
|
||||||
#[derive(Debug, Clone)]
|
#[derive(Debug, Clone)]
|
||||||
|
#[non_exhaustive]
|
||||||
pub enum PngError {
|
pub enum PngError {
|
||||||
DeflatedDataTooLong(usize),
|
DeflatedDataTooLong(usize),
|
||||||
TimedOut,
|
TimedOut,
|
||||||
|
|
@ -13,8 +12,6 @@ pub enum PngError {
|
||||||
TruncatedData,
|
TruncatedData,
|
||||||
ChunkMissing(&'static str),
|
ChunkMissing(&'static str),
|
||||||
Other(Box<str>),
|
Other(Box<str>),
|
||||||
#[doc(hidden)]
|
|
||||||
_Nonexhaustive,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Error for PngError {
|
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::APNGNotSupported => f.write_str("APNG files are not (yet) supported"),
|
||||||
PngError::ChunkMissing(s) => write!(f, "Chunk {} missing or empty", s),
|
PngError::ChunkMissing(s) => write!(f, "Chunk {} missing or empty", s),
|
||||||
PngError::Other(ref s) => f.write_str(s),
|
PngError::Other(ref s) => f.write_str(s),
|
||||||
PngError::_Nonexhaustive => unreachable!(),
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue