diff --git a/src/errors.rs b/src/errors.rs index 498c95d..8a9a694 100644 --- a/src/errors.rs +++ b/src/errors.rs @@ -6,7 +6,7 @@ use thiserror::Error; /// normally return `Error`, not `SubError`, which allows to return other /// kinds of errors from third-party libraries. #[derive(Debug, Error)] -pub enum SubError { +pub enum SubtileError { /// Error with `VobSub` #[error("Error with VobSub")] VobSub(#[from] crate::vobsub::VobSubError), diff --git a/src/image/utils.rs b/src/image/utils.rs index d8059cb..f78fc39 100644 --- a/src/image/utils.rs +++ b/src/image/utils.rs @@ -1,3 +1,4 @@ +use crate::SubtileError; use image::{EncodableLayout, Pixel, PixelWithColorType}; use std::{ fs::create_dir_all, @@ -7,8 +8,6 @@ use std::{ }; use thiserror::Error; -use crate::SubError; - /// Handle Error for image dump. #[derive(Error, Debug)] pub enum DumpError { @@ -33,7 +32,7 @@ pub enum DumpError { /// Dump some images in a folder specified by the path. #[profiling::function] -pub fn dump_images<'a, Img, P, Container>(path: &str, images: Img) -> Result<(), SubError> +pub fn dump_images<'a, Img, P, Container>(path: &str, images: Img) -> Result<(), SubtileError> where P: Pixel + PixelWithColorType + 'a, [P::Subpixel]: EncodableLayout, diff --git a/src/lib.rs b/src/lib.rs index 73d1b0c..3764223 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -28,4 +28,4 @@ pub mod time; mod util; pub mod vobsub; -pub use errors::SubError; +pub use errors::SubtileError;