Skip to content

Commit fcbf490

Browse files
committed
tweak wording in Error documentation
1 parent 1ec5e0f commit fcbf490

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

crates/apollo-parser/src/error.rs

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,21 +21,19 @@ use std::fmt;
2121
/// let doc = ast.document();
2222
/// ```
2323
///
24-
/// `Error` struct does not at the moment implement `Display`. We encourage you
25-
/// to take a look at the [miette] and [annotate_snippets] integration examples
26-
/// if you'd like to display Errors in a terminal-like environment. The
27-
/// `Error`'s API allows for you to configure other ways to render your errors
28-
/// as well if a terminal-like environment is not where your final output goes.
29-
///
3024
/// ### Diagnostics
3125
///
32-
/// Using something like [miette] along with apollo-parser lets you have
33-
/// diagnostics that look like this:
26+
/// Using something like [miette crate] along with apollo-parser lets you have
27+
/// more visual diagnostics. [miette] and [annotate_snippets] examples guide you
28+
/// through integrating them with apollo-parser. These are useful if you are
29+
/// displaying Errors in a terminal-like environment.
3430
///
3531
/// <img src="https://raw.githubusercontent.com/apollographql/apollo-rs/main/crates/apollo-parser/screenshots/apollo_parser_error.png" alt="A screenshot of an error example produced by using apollo-parser and miette. The ascii display shows a graphql code snippet with line numbers to the left. Under the code sample there is a line pointing to where a value is missing in graphql code">
3632
///
3733
/// [miette]: https://github.com/apollographql/apollo-rs/blob/a7f616454a53dcb8496725ceac6c63eacddefb2c/crates/apollo-parser/examples/miette.rs
3834
/// [annotate_snippets]: https://github.com/apollographql/apollo-rs/blob/a7f616454a53dcb8496725ceac6c63eacddefb2c/crates/apollo-parser/examples/annotate_snippet.rs
35+
/// [miette crate]: https://docs.rs/miette/3.2.0/miette/index.html
36+
3937
#[derive(PartialEq, Eq, Clone)]
4038
pub struct Error {
4139
pub(crate) message: String,

0 commit comments

Comments
 (0)