The macro ensure_whatever provides the functionality of the
ensure macro for stringly-typed errors.
Changed
No longer require the futures feature flag to support the shim
implementations of standard library errors that have existed since
Rust 1.34.
Documentation improved to demonstrate that custom Whatever errors
can optionally be made Send and Sync.
[0.7.0] - 2022-01-03
Many breaking changes in this release can be automatically addressed
with the snafu-upgrade-assistant.
Added
A crate prelude containing common macros and traits can be imported
via use snafu::prelude::*.
A ready-to-use error type Whatever is available to quickly start
reporting errors with little hassle.
"Stringly typed" error cases can be added to existing error types,
allowing you to construct errors without defining them first.
Formatting shorthand syntax for error type data fields is now supported:
#[snafu(display("Hello {name}"))].
[snafu(module)] can be specified on an error type. This will
create a module for the error type and all associated context
selectors will be placed in that module.
snafu::Location can be added to an error type to provide
lightweight tracking of the source location where the error was
created.
[snafu(implicit)] can be specified on context selector data fields
to automatically generate it via snafu::GenerateImplicitData when
the error is created.
ErrorCompat::iter_chain provides an iterator over the list of
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Bumps snafu from 0.6.10 to 0.7.1.
Changelog
Sourced from snafu's changelog.
... (truncated)
Commits
6159ea9
Release 0.7.124c6855
Update the changelogf7f3ddf
Merge pull request #331 from shepmaster/whatever-send-syncf679939
Merge pull request #330 from shepmaster/ensure_whatever857301a
Show how to make custom Whatever types Send / Sync0665bb3
Add anensure_whatever
macro.625b8e5
Merge pull request #329 from shepmaster/maint83bd3d3
Update heck to 0.4171a3cf
Merge pull request #327 from shepmaster/msrv-core-errors76c02d8
Add errors stabilized in 1.34 to the core Error shimsDependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase
.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)