From 1bf78ba3f40fc44aec8930dacde092b7cc518d92 Mon Sep 17 00:00:00 2001 From: nabijaczleweli Date: Sun, 19 Apr 2020 13:54:41 +0200 Subject: [PATCH] Remove ImageError::UnsupportedError() Ref: #1134 --- src/error.rs | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/src/error.rs b/src/error.rs index 5d8b4c47a8..33192f2f35 100644 --- a/src/error.rs +++ b/src/error.rs @@ -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. /// @@ -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()