Skip to content

Commit

Permalink
A couple small docs improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
benfrankel committed Aug 1, 2024
1 parent 254e00d commit 0106b60
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ fn increment_last(list: &mut [i32]) {
The macros support `bool`, `Option`, and `Result` types out-of-the-box. This can be extended by implementing
the [`Success`](https://docs.rs/tiny_bail/latest/tiny_bail/trait.Success.html) trait for other types.

You can specify the return value as an optional first argument to the macro, or omit it to default to
You can specify a return value as an optional first argument to the macro, or omit it to default to
`Default::default()`—which even works in functions with no return value.

# License
Expand Down
7 changes: 4 additions & 3 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
//! The macros support `bool`, `Option`, and `Result` types out-of-the-box. This can be extended by implementing
//! the [`Success`] trait for other types.
//!
//! You can specify the return value as an optional first argument to the macro, or omit it to default to
//! You can specify a return value as an optional first argument to the macro, or omit it to default to
//! `Default::default()`—which even works in functions with no return value.

// Verify that the feature combination is sane.
Expand Down Expand Up @@ -69,7 +69,7 @@ pub mod prelude {
pub use super::{c, cq, or_continue, or_continue_quiet, or_return, or_return_quiet, r, rq};
}

/// An extension trait for extracting success from failure types.
/// An extension trait for extracting success from fallible types.
pub trait Success<T> {
/// Return the success value, or `None` on failure.
fn success(self) -> Option<T>;
Expand Down Expand Up @@ -112,7 +112,8 @@ macro_rules! set_logger {
};
}

// Workaround from https://github.com/rust-lang/rust/pull/52234.
/// Workaround for https://github.com/rust-lang/rust/pull/52234.
#[doc(hidden)]
pub use ___log_on_bail as __log_on_bail;
};
}
Expand Down

0 comments on commit 0106b60

Please sign in to comment.