Skip to content

Commit

Permalink
doc: update
Browse files Browse the repository at this point in the history
  • Loading branch information
mcmah309 committed Oct 30, 2024
1 parent ac16259 commit 82b11b2
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,7 @@ pub enum ErrorEnum {
}
```

#### Source Structs Variants
#### Source Struct Variants
Source struct variants are also supported, declared like so
```rust
error_set! {
Expand Down Expand Up @@ -552,10 +552,7 @@ let val = func().consume_warn();
rather than
```rust
let val = func().inspect_err(|err| tracing::warn!("`func` failed, here is some extra context like variable values"))?;
let val = func().map_err(|err| {
tracing::warn!("{}", err);
None
});
let val = func().inspect_err(|err| tracing::warn!("{}", err)).ok();
```
> Note: a `context_stub` feature flag also exists to be used by libraries. This allows the api's to be used in libraries
> while a downstream binary can ultimately decide the implementation. If no implementations is selected, since all the above
Expand Down

0 comments on commit 82b11b2

Please sign in to comment.