diff --git a/crates/stef-build/src/lib.rs b/crates/stef-build/src/lib.rs index 6e4fb93..17196b5 100644 --- a/crates/stef-build/src/lib.rs +++ b/crates/stef-build/src/lib.rs @@ -5,6 +5,7 @@ use std::{ convert::AsRef, + fmt::Debug, path::{Path, PathBuf}, }; @@ -20,7 +21,7 @@ mod encode; pub type Result = std::result::Result; -#[derive(Debug, Error)] +#[derive(Error)] pub enum Error { #[error("failed to parse the glob pattern {glob:?}")] Pattern { @@ -45,6 +46,12 @@ pub enum Error { Compile { report: Report, file: PathBuf }, } +impl Debug for Error { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(f, "{self}") + } +} + pub fn compile(schemas: &[impl AsRef], _includes: &[impl AsRef]) -> Result<()> { miette::set_hook(Box::new(|_| { Box::new(