mirror of
https://github.com/stefanoamorelli/crabrl.git
synced 2026-04-18 07:10:42 +00:00
fix: downgrade compact_str to 0.7 for CI compatibility
Resolves rustc version mismatch errors in CI pipeline
This commit is contained in:
@@ -12,7 +12,7 @@ categories = ["parser-implementations", "finance", "command-line-utilities"]
|
|||||||
[dependencies]
|
[dependencies]
|
||||||
# Core
|
# Core
|
||||||
quick-xml = "0.36"
|
quick-xml = "0.36"
|
||||||
compact_str = "0.8"
|
compact_str = "0.7"
|
||||||
chrono = "0.4"
|
chrono = "0.4"
|
||||||
|
|
||||||
# Performance
|
# Performance
|
||||||
|
|||||||
30
src/lib.rs
30
src/lib.rs
@@ -102,17 +102,29 @@ pub struct ValidationStats {
|
|||||||
|
|
||||||
pub type Result<T> = std::result::Result<T, Error>;
|
pub type Result<T> = std::result::Result<T, Error>;
|
||||||
|
|
||||||
#[derive(Debug, thiserror::Error)]
|
#[derive(Debug)]
|
||||||
pub enum Error {
|
pub enum Error {
|
||||||
#[error("IO error: {0}")]
|
Io(std::io::Error),
|
||||||
Io(#[from] std::io::Error),
|
|
||||||
|
|
||||||
#[error("Parse error: {0}")]
|
|
||||||
Parse(String),
|
Parse(String),
|
||||||
|
|
||||||
#[error("Validation error: {0}")]
|
|
||||||
Validation(String),
|
Validation(String),
|
||||||
|
|
||||||
#[error("Not found: {0}")]
|
|
||||||
NotFound(String),
|
NotFound(String),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl std::fmt::Display for Error {
|
||||||
|
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||||
|
match self {
|
||||||
|
Error::Io(e) => write!(f, "IO error: {}", e),
|
||||||
|
Error::Parse(s) => write!(f, "Parse error: {}", s),
|
||||||
|
Error::Validation(s) => write!(f, "Validation error: {}", s),
|
||||||
|
Error::NotFound(s) => write!(f, "Not found: {}", s),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
impl std::error::Error for Error {}
|
||||||
|
|
||||||
|
impl From<std::io::Error> for Error {
|
||||||
|
fn from(err: std::io::Error) -> Self {
|
||||||
|
Error::Io(err)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user