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 method_ref, uri_ref, headers_ref to request::Builder #284
Add method_ref, uri_ref, headers_ref to request::Builder #284
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.
Thanks for doing this. Lets see what @seanmonstar thinks about adding these APIs.
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 forgot that the builder carries an error, and so these all need to return Option
s. That's a bummer.
I don't have much of an opinion on get_*
, really. An alternative is also *_ref
, like method_ref()
. I don't know if that's any better...
change function name get_method -> method_ref get_uri -> uri_ref get_headers -> header_ref avoid clone, and returns reference
thanks comments, I done to apply change request. I found some diff on |
@kazuk please avoid formatting unrelated parts of code. |
Something Can I do for this PR? |
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. I'll let @seanmonstar do a final review + merge.
I like the _ref
suffix pattern for this.
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.
Thanks for sticking with it!
implementation for #282