-
Notifications
You must be signed in to change notification settings - Fork 245
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: make HTTP provider optional #379
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pedantic nit
otherwise sounds reasonable to me
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm, pending @DaniPopes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm too
I'll give a try |
@prestwich I think the merge went fine |
3a18271
to
4c224ea
Compare
crates/provider/src/builder.rs
Outdated
@@ -225,23 +226,25 @@ impl<L, N> ProviderBuilder<L, N> { | |||
Ok(self.on_client(client)) | |||
} | |||
|
|||
/// Build this provider with an Reqwest HTTP transport. | |||
#[cfg(feature = "reqwest")] | |||
pub fn on_reqwest_http(self, url: url::Url) -> Result<L::Provider, TransportError> | |||
where | |||
L: ProviderLayer<RootProvider<N, BoxTransport>, N, BoxTransport>, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is probably on me, but we should not box here, given the user has explicitly specified the transport type to be used. replace these BoxTransport
usages with naming the Http type
crates/provider/src/builder.rs
Outdated
Ok(self.on_client(client)) | ||
} | ||
|
||
/// Build this provider with an Hyper HTTP transport. | ||
#[cfg(feature = "hyper")] | ||
pub fn on_hyper_http(self, url: url::Url) -> Result<L::Provider, TransportError> | ||
where | ||
L: ProviderLayer<RootProvider<N, BoxTransport>, N, BoxTransport>, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
here too
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this may require reproducing generics from down the stack I think. if it gets ugly or annoying go ahead and skip this for hyper
actually I'm gonna go ahead and rebase and do this :) |
0638baf
to
764c4fe
Compare
Closes #199