Skip to content
Myr

Use instrs.json as file path in examples

Before adoption: this commit came in with the history the project adopted, so no landing records it.

The jsox file extension was intended to imply that there had been a typo, but it ended up being distracting.

authored by David Tolnay · committed by David Tolnay · parent 437c691 · Browse files · 2 files+8 added−8 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

2 files+8 added−8 removed

  • other:+8 added−8 removed

2 files+8 added−8 removed

modified:src/lib.rs+7 added-7 removed
60 unmodified lines
61//! ...62//! # };63//! #64//! # let it = It;65//! # let path = "./path/to/instrs.jsox";65//! # let path = "./path/to/instrs.json";66//! #67//! it.detach().context("Failed to detach the important thing")?;68//!69//! let content = std::fs::read(path)
7 unmodified lines
77//! }78//! ```79//!80//! ```console81//! Error: Failed to read instrs from ./path/to/instrs.jsox81//! Error: Failed to read instrs from ./path/to/instrs.json82//!83//! Caused by:84//! No such file or directory (os error 2)85//! ```
119 unmodified lines
205/// This is exactly as if you had called the Display impl of the error from206/// which you constructed your anyhow::Error.207///208/// ```console209/// Failed to read instrs from ./path/to/instrs.jsox209/// Failed to read instrs from ./path/to/instrs.json210/// ```211///212/// To print causes as well using anyhow's default formatting of causes, use the213/// alternate selector "{:#}".214///215/// ```console216/// Failed to read instrs from ./path/to/instrs.jsox: No such file or directory (os error 2)216/// Failed to read instrs from ./path/to/instrs.json: No such file or directory (os error 2)217/// ```218///219/// The Debug format "{:?}" includes your backtrace if one was captured. Note220/// that this is the representation you get by default if you return an error221/// from `fn main` instead of printing it explicitly yourself.222///223/// ```console224/// Error: Failed to read instrs from ./path/to/instrs.jsox224/// Error: Failed to read instrs from ./path/to/instrs.json225///226/// Caused by:227/// No such file or directory (os error 2)228///
16 unmodified lines
245/// To see a conventional struct-style Debug representation, use "{:#?}".246///247/// ```console248/// Error {249/// context: "Failed to read instrs from ./path/to/instrs.jsox",249/// context: "Failed to read instrs from ./path/to/instrs.json",250/// source: Os {251/// code: 2,252/// kind: NotFound,253/// message: "No such file or directory",
143 unmodified lines
397/// When printed, the outermost context would be printed first and the lower398/// level underlying causes would be enumerated below.399///400/// ```console401/// Error: Failed to read instrs from ./path/to/instrs.jsox401/// Error: Failed to read instrs from ./path/to/instrs.json402///403/// Caused by:404/// No such file or directory (os error 2)405/// ```
126 unmodified lines
modified:README.md+1 added-1 removed