Skip to content

Commit

Permalink
Make more parts available with wasm feature (iotaledger#577)
Browse files Browse the repository at this point in the history
  • Loading branch information
Thoralf-M authored May 21, 2021
1 parent 9ee430c commit caa262c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions iota-client/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -114,11 +114,11 @@ pub enum Error {
#[error("{0}")]
UreqError(#[from] ureq::Error),
/// Error from RestAPI calls with unexpected status code response
#[cfg(feature = "async")]
#[cfg(any(feature = "async", feature = "wasm"))]
#[error("Response error with status code {0}: {1}")]
ResponseError(u16, String),
/// reqwest error
#[cfg(feature = "async")]
#[cfg(any(feature = "async", feature = "wasm"))]
#[error("{0}")]
ReqwestError(#[from] reqwest::Error),
/// URL error
Expand Down
8 changes: 4 additions & 4 deletions iota-client/src/node_manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -481,10 +481,10 @@ impl Response {
}
}

#[cfg(feature = "async")]
#[cfg(any(feature = "async", feature = "wasm"))]
pub(crate) struct Response(reqwest::Response);

#[cfg(feature = "async")]
#[cfg(any(feature = "async", feature = "wasm"))]
impl Response {
pub(crate) fn status(&self) -> u16 {
self.0.status().as_u16()
Expand All @@ -499,7 +499,7 @@ impl Response {
}
}

#[cfg(feature = "async")]
#[cfg(any(feature = "async", feature = "wasm"))]
#[derive(Clone)]
pub(crate) struct HttpClient {
client: reqwest::Client,
Expand All @@ -508,7 +508,7 @@ pub(crate) struct HttpClient {
#[cfg(all(feature = "sync", not(feature = "async")))]
pub(crate) struct HttpClient;

#[cfg(feature = "async")]
#[cfg(any(feature = "async", feature = "wasm"))]
impl HttpClient {
pub(crate) fn new() -> Self {
Self {
Expand Down

0 comments on commit caa262c

Please sign in to comment.