Skip to content

Commit 95e3c7c

Browse files
committed
fixup
1 parent c00949c commit 95e3c7c

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
A error library that supports tracking the call-site location of errors. Also features an anyhow-style `AnyError`.
66

77
```rust
8-
use n0_error::{err, stack_error, StackError, Result, StackResultExt, StdResultExt};
8+
use n0_error::{e, stack_error, StackError, Result, StackResultExt, StdResultExt};
99

1010
/// The `stack_error` macro controls how to turn our enum into a `StackError`.
1111
///
@@ -34,14 +34,14 @@ fn fail_io() -> std::io::Result<()> {
3434
// An outer function returning our custom MyError
3535
fn some_fn(count: usize) -> Result<(), MyError> {
3636
if count == 13 {
37-
// The `err` macro constructs a `StackError` while automatically adding the `meta` field.
38-
return Err(err!(MyError::BadInput { count }));
37+
// The `e` macro constructs a `StackError` while automatically adding the `meta` field.
38+
return Err(e!(MyError::BadInput { count }));
3939
}
4040
// We have a `From` impl for `std::io::Error` on our error.
4141
fail_io()?;
4242
// Without the From impl, we'd need to forward the error manually.
43-
// The `err` macro can assist here, so that we don't have to declare the `meta` field manually.
44-
fail_io().map_err(|source| err!(MyError::Io, source))?;
43+
// The `e` macro can assist here, so that we don't have to declare the `meta` field manually.
44+
fail_io().map_err(|source| e!(MyError::Io, source))?;
4545
Ok(())
4646
}
4747

0 commit comments

Comments
 (0)