Skip to content

Commit

Permalink
Remove unused error enum
Browse files Browse the repository at this point in the history
  • Loading branch information
emdoyle committed Feb 3, 2025
1 parent c4950ce commit 3004ded
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 23 deletions.
16 changes: 0 additions & 16 deletions src/commands/check/error.rs
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
use std::io;

use thiserror::Error;

use crate::diagnostics::DiagnosticError;
use crate::exclusion;
use crate::external;
use crate::filesystem as fs;
use crate::interfaces::error::InterfaceError;
use crate::modules;
use crate::processors::imports;

#[derive(Error, Debug)]
pub enum CheckError {
Expand All @@ -29,15 +25,3 @@ pub enum CheckError {
#[error("Diagnostic error: {0}")]
Diagnostic(#[from] DiagnosticError),
}

#[derive(Error, Debug)]
pub enum ExternalCheckError {
#[error("Parsing error: {0}")]
Parse(#[from] external::ParsingError),
#[error("Import parsing error: {0}")]
ImportParse(#[from] imports::ImportParseError),
#[error("IO error: {0}")]
Io(#[from] io::Error),
#[error("Filesystem error: {0}")]
Filesystem(#[from] fs::FileSystemError),
}
2 changes: 1 addition & 1 deletion src/commands/check/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ pub mod format;

pub use check_external::check as check_external;
pub use check_internal::check as check_internal;
pub use error::{CheckError, ExternalCheckError};
pub use error::CheckError;
6 changes: 0 additions & 6 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,6 @@ impl From<cache::CacheError> for PyErr {
}
}

impl From<check::ExternalCheckError> for PyErr {
fn from(err: check::ExternalCheckError) -> Self {
PyOSError::new_err(err.to_string())
}
}

impl From<check::CheckError> for PyErr {
fn from(err: check::CheckError) -> Self {
match err {
Expand Down

0 comments on commit 3004ded

Please sign in to comment.