Skip to content

Commit

Permalink
refactor!: rename SubError to SubtileError
Browse files Browse the repository at this point in the history
  • Loading branch information
gwen-lg committed Jul 18, 2024
1 parent f1f0b84 commit eaca452
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down
5 changes: 2 additions & 3 deletions src/image/utils.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
use crate::SubtileError;
use image::{EncodableLayout, Pixel, PixelWithColorType};
use std::{
fs::create_dir_all,
Expand All @@ -7,8 +8,6 @@ use std::{
};
use thiserror::Error;

use crate::SubError;

/// Handle Error for image dump.
#[derive(Error, Debug)]
pub enum DumpError {
Expand All @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@ pub mod time;
mod util;
pub mod vobsub;

pub use errors::SubError;
pub use errors::SubtileError;

0 comments on commit eaca452

Please sign in to comment.