Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update comment #11

Merged
merged 1 commit into from
Sep 15, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions src/flat_map_err.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
/// A trait for `Result` that allows chaining a function that returns a `Result` to the error type.
///
/// # Examples
/// One use case is if the ok type, `T` has a default value, and the error type, `E` may take
/// multiple values that may be ignored, then this trait can be used to map the error type to the
/// default value of `T` for the errors that can be ignored.
/// If the Ok type, `T` has a default value, and the error type, `E` has some ignorable values, then
/// this trait can be used to map the ignorabl error type values to the default value of `T`.
pub(crate) trait FlatMapErr<T, D, E> {
fn flat_map_err<F>(self, f: F) -> Result<T, E>
where
Expand Down