Skip to content
Myr

Copy bail mention from readme to rustdoc

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

authored by David Tolnay · committed by David Tolnay · parent 45555cc · Browse files · 1 file+12 added−0 removed
This commit

State

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

Diff stats

1 file+12 added−0 removed

  • other:+12 added−0 removed

1 file+12 added−0 removed

modified:src/lib.rs+12 added
177 unmodified lines
178//! # Ok(())179//! # }180//! ```181//!182//! A `bail!` macro is provided as a shorthand for the same early return.183//!184//! ```185//! # use anyhow::{bail, Result};186//! #187//! # fn demo() -> Result<()> {188//! # let missing = "...";189//! bail!("Missing attribute: {}", missing);190//! # Ok(())191//! # }192//! ```193//!194//! <br>195//!196//! # No-std support197//!
427 unmodified lines