mirror of https://github.com/zkat/miette.git
fix(error): point to the correct variant on the docs url
This commit is contained in:
parent
2450afce9e
commit
5ea444b418
|
|
@ -39,9 +39,13 @@ impl Diagnostic for MietteError {
|
|||
|
||||
fn url<'a>(&'a self) -> Option<Box<dyn fmt::Display + 'a>> {
|
||||
let crate_version = env!("CARGO_PKG_VERSION");
|
||||
let variant = match self {
|
||||
MietteError::IoError(_) => "#variant.IoError",
|
||||
MietteError::OutOfBounds => "#variant.OutOfBounds",
|
||||
};
|
||||
Some(Box::new(format!(
|
||||
"https://docs.rs/miette/{}/miette/enum.MietteError.html",
|
||||
crate_version,
|
||||
"https://docs.rs/miette/{}/miette/enum.MietteError.html{}",
|
||||
crate_version, variant,
|
||||
)))
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue