docs: update readme with info about fancy feature

This commit is contained in:
Kat Marchán 2021-09-22 16:36:41 -07:00
parent 468843aa5c
commit f92c75f176
No known key found for this signature in database
GPG Key ID: AEB529C08A3C7E9E
1 changed files with 10 additions and 0 deletions

View File

@ -24,6 +24,11 @@ but it's definitely a bug and should be reported.
diagnostic error code: ruget::api::bad_json
" />
**NOTE: You must enable the `"fancy"` crate feature to get fancy report output
like in the screenshots here.** You should only do this in your toplevel
crate, as the fancy feature pulls in a number of dependencies that libraries
and such might not want.
## Table of Contents <!-- omit in toc -->
- [About](#about)
@ -232,6 +237,11 @@ pub fn some_tool() -> Result<Version> {
`Result` as your return value, and it will pretty-print your
diagnostics automatically.
**NOTE: You must enable the `"fancy"` crate feature to get fancy report output
like in the screenshots here.** You should only do this in your toplevel
crate, as the fancy feature pulls in a number of dependencies that libraries
and such might not want.
```rust
use miette::{Result, IntoDiagnostic};
use semver::Version;