-
-
Notifications
You must be signed in to change notification settings - Fork 271
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: add methods to builder for changing timeouts #498
feat: add methods to builder for changing timeouts #498
Conversation
95d713a
to
10479e0
Compare
10479e0
to
a586def
Compare
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.
Thank you for your PR! LGTM I have just one minor change request.
src/lib.rs
Outdated
@@ -485,6 +485,27 @@ impl OctocrabBuilder<NoSvc, DefaultOctocrabBuilderConfig, NoAuth, NotLayerReady> | |||
self | |||
} | |||
|
|||
/// Set the connect timeout. | |||
#[cfg(feature = "timeout")] |
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.
Does this really need its own feature flag? I think it's probably better to just have it included by default.
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 know. But, much of the timeout
functionality is already guarded behind the timeout
feature flag. I figured it'd be good to keep it in order to keep things consistent and to clean up the compiled output.
Note that I don't know what value it would provide users. If this code isn't guarded behind the timeout
flag since then users who are not using the timeout
flag will see methods that won't be of any use to them.
Thank you for your PR, and congrats on your first contribution! 🎉 |
@XAMPPRocky I think the feature flag mentioned above is indeed required: I think reverting f1c94c1 does fix this issue. |
Work related to #497 .