Skip to content

Commit

Permalink
Merge pull request #1205 from nabijaczleweli/introverted
Browse files Browse the repository at this point in the history
Remove ImageError::UnsupportedError()
  • Loading branch information
HeroicKatora authored Apr 19, 2020
2 parents 947fda9 + 1bf78ba commit f543dd5
Showing 1 changed file with 0 additions and 17 deletions.
17 changes: 0 additions & 17 deletions src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -191,15 +191,6 @@ pub enum ImageFormatHint {
__NonExhaustive(NonExhaustiveMarker),
}

// Internal implementation block for ImageError.
#[allow(non_upper_case_globals)]
#[allow(non_snake_case)]
impl ImageError {
pub(crate) fn UnsupportedError(message: String) -> Self {
ImageError::Unsupported(UnsupportedError::legacy_from_string(message))
}
}

impl UnsupportedError {
/// Create an `UnsupportedError` for an image with details on the unsupported feature.
///
Expand All @@ -212,14 +203,6 @@ impl UnsupportedError {
}
}

/// A shorthand for a generic feature without an image format.
pub(crate) fn legacy_from_string(message: String) -> Self {
UnsupportedError {
format: ImageFormatHint::Unknown,
kind: UnsupportedErrorKind::GenericFeature(message),
}
}

/// Returns the corresponding `UnsupportedErrorKind` of the error.
pub fn kind(&self) -> UnsupportedErrorKind {
self.kind.clone()
Expand Down

0 comments on commit f543dd5

Please sign in to comment.