-
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
Adds check -Zcheck-cfg
job
#419
Conversation
Also, I think we should make the |
crates/provider/src/builder.rs
Outdated
#[cfg(feature = "hyper")] | ||
pub fn on_hyper_http(self, url: url::Url) -> Result<L::Provider, TransportError> | ||
where | ||
L: ProviderLayer<RootProvider<N, BoxTransport>, N, BoxTransport>, | ||
N: Network, | ||
{ | ||
let client = ClientBuilder::default().hyper_http(url); | ||
let client = ClientBuilder::default().hyper_http(url).boxed(); |
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.
I don't think this should be boxed
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.
@prestwich Unsure why but adding these features forced the ProviderBuilder::on_client(&self, client: RpcClient) to only accept RpcClient
Yes it shouldn't.
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.
oh I just saw this in #379 and was confused about it 🤔
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.
i think what happened is that the blocks were previously entirely non-functional, and therefore were written incorrectly and we didn't notice (because they were non-functional and never checked by the compiler). Now that the cfg blocks are effective, a compiler warning appears. I'll fix in #379 in a second
Added here: #421 |
@yash-atreya would you rebase now that #379 is in? |
Yeah I'll take care of it |
Motivation
Ref: #416
And fixes: #416 (comment)
Solution
Adds
reqwest
andhyper
features inalloy-provider
.@prestwich Unsure why but adding these features forced the
ProviderBuilder::on_client(&self, client: RpcClient<T>)
to only acceptRpcClient<BoxTransport>
PR Checklist