fix: downgrade compact_str to 0.7 for CI compatibility

Resolves rustc version mismatch errors in CI pipeline
This commit is contained in:
Stefano Amorelli
2025-08-17 13:48:48 +03:00
parent 3c1519e405
commit bb61efca48
2 changed files with 22 additions and 10 deletions

View File

@@ -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

View File

@@ -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)
}
}