mirror of
https://github.com/rzmk/czv.git
synced 2025-12-19 08:09:24 +00:00
refactor: improve error-handling, fix lints, & update criterion
This commit is contained in:
parent
f435642358
commit
c0b76fa543
6 changed files with 58 additions and 118 deletions
|
|
@ -8,25 +8,25 @@ pub struct CzvError(anyhow::Error);
|
|||
|
||||
impl From<OGError> for CzvError {
|
||||
fn from(value: OGError) -> Self {
|
||||
value.into()
|
||||
Self(anyhow::anyhow!(value))
|
||||
}
|
||||
}
|
||||
|
||||
impl From<pyo3::PyErr> for CzvError {
|
||||
fn from(value: pyo3::PyErr) -> Self {
|
||||
value.into()
|
||||
Self(anyhow::anyhow!(value))
|
||||
}
|
||||
}
|
||||
|
||||
impl From<csv::Error> for CzvError {
|
||||
fn from(value: csv::Error) -> Self {
|
||||
value.into()
|
||||
Self(anyhow::anyhow!(value))
|
||||
}
|
||||
}
|
||||
|
||||
impl From<CzvError> for pyo3::PyErr {
|
||||
fn from(value: CzvError) -> Self {
|
||||
value.into()
|
||||
anyhow::anyhow!(value).into()
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue