Skip to content

Commit

Permalink
remove relative dependency and format
Browse files Browse the repository at this point in the history
  • Loading branch information
jpopesculian committed Oct 4, 2023
1 parent 7956bb2 commit f4959b4
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ categories = ["web-programming::http-client", "no-std", "parsing", "asynchronous

[dependencies]
eventsource-stream = "0.2.3"
reqwest = { version = "0.11", path = "../reqwest", default-features = false, features = ["stream"] }
reqwest = { version = "0.11", default-features = false, features = ["stream"] }
futures-core = "0.3.5"
pin-project-lite = "0.2.8"
nom = "7.1.0"
Expand Down
18 changes: 9 additions & 9 deletions src/event_source.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ use crate::retry::{RetryPolicy, DEFAULT_RETRY};
use core::pin::Pin;
use eventsource_stream::Eventsource;
pub use eventsource_stream::{Event as MessageEvent, EventStreamError};
#[cfg(not(target_arch="wasm32"))]
#[cfg(not(target_arch = "wasm32"))]
use futures_core::future::BoxFuture;
#[cfg(target_arch="wasm32")]
use futures_core::future::LocalBoxFuture;
use futures_core::future::Future;
#[cfg(not(target_arch="wasm32"))]
#[cfg(target_arch = "wasm32")]
use futures_core::future::LocalBoxFuture;
#[cfg(not(target_arch = "wasm32"))]
use futures_core::stream::BoxStream;
#[cfg(target_arch="wasm32")]
#[cfg(target_arch = "wasm32")]
use futures_core::stream::LocalBoxStream;
use futures_core::stream::Stream;
use futures_core::task::{Context, Poll};
Expand All @@ -20,14 +20,14 @@ use reqwest::header::{HeaderName, HeaderValue};
use reqwest::{Error as ReqwestError, IntoUrl, RequestBuilder, Response, StatusCode};
use std::time::Duration;

#[cfg(not(target_arch="wasm32"))]
#[cfg(not(target_arch = "wasm32"))]
type ResponseFuture = BoxFuture<'static, Result<Response, ReqwestError>>;
#[cfg(target_arch="wasm32")]
#[cfg(target_arch = "wasm32")]
type ResponseFuture = LocalBoxFuture<'static, Result<Response, ReqwestError>>;

#[cfg(not(target_arch="wasm32"))]
#[cfg(not(target_arch = "wasm32"))]
type EventStream = BoxStream<'static, Result<MessageEvent, EventStreamError<ReqwestError>>>;
#[cfg(target_arch="wasm32")]
#[cfg(target_arch = "wasm32")]
type EventStream = LocalBoxStream<'static, Result<MessageEvent, EventStreamError<ReqwestError>>>;

type BoxedRetry = Box<dyn RetryPolicy + Send + Unpin + 'static>;
Expand Down

0 comments on commit f4959b4

Please sign in to comment.