forked from shepmaster/snafu
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This brings no_std support to SNAFU. It now has a `std` feature which is activated by default. To make no_std support as frictionless as possible, SNAFU now reexports the `std::error::Error` trait as `snafu::Error` when the feature is activated and defines its own API compatible trait instead when it's disabled. In order to not commit to having a publicly visible copy of the `Error` trait in SNAFU, hiding it from the documentation allows for SNAFU to still support all of its features, but the user never gets to use the trait. This way SNAFU can switch out the trait at any point with `core::error::Error` if that becomes a thing. Alternatively the trait here can also be made visible at some point. Both of these possibilities are not breaking, so the conservative approach with `doc(hidden)` allows for the smoothest experience going forward. Resolves shepmaster#85
- Loading branch information
1 parent
698aeed
commit 7fbf5e3
Showing
10 changed files
with
169 additions
and
97 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,4 +5,4 @@ authors = ["Jake Goulding <[email protected]>"] | |
edition = "2018" | ||
|
||
[dependencies] | ||
snafu = { path = "../..", default-features = false, features = [] } | ||
snafu = { path = "../..", default-features = false, features = ["std"] } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.