-
Notifications
You must be signed in to change notification settings - Fork 21
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
Add ability to create a new WebPushClient from a custom Isahc/hyper client (#56) #57
Conversation
naskya
commented
Apr 29, 2024
- Closes feature request: add ability to use proxy #56
Thanks for the contribution! Would you mind removing the unused import causing the CI to fail? I don't think this is actually from your changes, but either way it would be nice to fix while we're here. |
Okay! I applied the fixes suggested by Clippy also warned me that this rust-web-push/examples/simple_send.rs Lines 85 to 86 in 010cac3
because rust-web-push/src/clients/hyper_client.rs Line 40 in 010cac3
which comes from rust-web-push/src/clients/hyper_client.rs Lines 79 to 87 in 010cac3
rust-web-push/src/clients/request_builder.rs Lines 73 to 74 in 010cac3
Part of me wonders if this is unintentional and you may actually want to return rust-web-push/src/clients/request_builder.rs Lines 165 to 168 in 010cac3
|
1fc7301
to
612fe38
Compare
Having said that, changing the return value of a function would cause a breaking change, and it may be too much to address that warning in this single merge request, so I personally think we should ignore it for now. |
Yeah, I agree. I think it's a reasonable pattern to use to just use a Result with a Unit in the Ok when you only want to indicate an error, but the way the code is used here is odd. Given the functions docs and the unit test it does look like this is intential, and the function is just used to check for bad HTTP codes. Not ideal, but pretty niche tbh given how this library is normally used. Now that all the CI passes, I'll merge this in. Thanks for the help again! |