use std::io;
use std::path::PathBuf;
use std::result::Result as StdResult;
#[derive(Debug, thiserror::Error)]
pub enum Error {
#[error("I/O error: {0}")]
Io(#[from] io::Error),
#[error("No source files found in {0}")]
NoSourceFiles(PathBuf),
#[error("{field} must be {expected}, got {value}")]
InvalidConfig {
field: &'static str,
value: String,
expected: &'static str,
},
#[error("baseline {}: {problem}", .path.display())]
Baseline { path: PathBuf, problem: String },
#[error("{0}")]
Other(String),
}
pub type Result<T> = StdResult<T, Error>;