Skip to content
This repository has been archived by the owner on Apr 15, 2024. It is now read-only.

Commit

Permalink
Added std to errors and crate
Browse files Browse the repository at this point in the history
  • Loading branch information
Brord van Wierst authored and kwek20 committed Oct 31, 2022
1 parent 1a1b816 commit f681713
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 1 deletion.
1 change: 1 addition & 0 deletions lets/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ version = "0.2.0"

[features]
default = ["utangle-client"]
std = ["spongos/std"]
# Enable the IOTA-Tangle transport client (implies `std` features)
tangle-client = ["iota-client/async", "futures", "iota-crypto/blake2b"]
# Enable the wasm-compatible IOTA-Tangle transport client (incompatile with `tangle-client` feature due to `iota-client/async` using `tokio`. Implies `std` feature)
Expand Down
6 changes: 6 additions & 0 deletions lets/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -161,3 +161,9 @@ impl From<reqwest::Error> for Error {
Self::Request(error)
}
}

#[cfg(feature = "std")]
extern crate std;

#[cfg(feature = "std")]
impl std::error::Error for Error {}
3 changes: 2 additions & 1 deletion streams/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ readme = "README.md"
version = "0.2.0"

[features]
default = ["utangle-client"]
default = ["utangle-client", "std"]
std = ["lets/std", "spongos/std"]
did = ["lets/did"]
# Enable re-export of uTangle transport client from LETS
utangle-client = ["lets/utangle-client"]
Expand Down
6 changes: 6 additions & 0 deletions streams/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -116,3 +116,9 @@ impl From<anyhow::Error> for Error {
Self::External(error)
}
}

#[cfg(feature = "std")]
extern crate std;

#[cfg(feature = "std")]
impl std::error::Error for Error {}

0 comments on commit f681713

Please sign in to comment.