mirror of https://github.com/zkat/miette.git
docs: fix broken link
This commit is contained in:
parent
b2011f693b
commit
69466ddfff
|
|
@ -100,7 +100,7 @@ You can derive a `Diagnostic` from any `std::error::Error` type.
|
||||||
|
|
||||||
`thiserror` is a great way to define them, and plays nicely with `miette`!
|
`thiserror` is a great way to define them, and plays nicely with `miette`!
|
||||||
*/
|
*/
|
||||||
use miette::{Diagnostic, SourceSpan};
|
use miette::{Diagnostic, NamedSource, SourceSpan};
|
||||||
use thiserror::Error;
|
use thiserror::Error;
|
||||||
|
|
||||||
#[derive(Error, Debug, Diagnostic)]
|
#[derive(Error, Debug, Diagnostic)]
|
||||||
|
|
@ -127,7 +127,7 @@ Use this `Result` type (or its expanded version) as the return type
|
||||||
throughout your app (but NOT your libraries! Those should always return
|
throughout your app (but NOT your libraries! Those should always return
|
||||||
concrete types!).
|
concrete types!).
|
||||||
*/
|
*/
|
||||||
use miette::{NamedSource, Result};
|
use miette::Result;
|
||||||
fn this_fails() -> Result<()> {
|
fn this_fails() -> Result<()> {
|
||||||
// You can use plain strings as a `Source`, or anything that implements
|
// You can use plain strings as a `Source`, or anything that implements
|
||||||
// the one-method `Source` trait.
|
// the one-method `Source` trait.
|
||||||
|
|
@ -266,7 +266,7 @@ pub fn some_tool() -> Result<Version> {
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
To construct your own simple adhoc error use the [miette!] macro:
|
To construct your own simple adhoc error use the [`miette!`] macro:
|
||||||
```rust
|
```rust
|
||||||
// my_app/lib/my_internal_file.rs
|
// my_app/lib/my_internal_file.rs
|
||||||
use miette::{miette, Result};
|
use miette::{miette, Result};
|
||||||
|
|
|
||||||
|
|
@ -266,7 +266,7 @@
|
||||||
//! }
|
//! }
|
||||||
//! ```
|
//! ```
|
||||||
//!
|
//!
|
||||||
//! To construct your own simple adhoc error use the [miette!] macro:
|
//! To construct your own simple adhoc error use the [`miette!`] macro:
|
||||||
//! ```rust
|
//! ```rust
|
||||||
//! // my_app/lib/my_internal_file.rs
|
//! // my_app/lib/my_internal_file.rs
|
||||||
//! use miette::{miette, Result};
|
//! use miette::{miette, Result};
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue