-
Notifications
You must be signed in to change notification settings - Fork 628
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
Make access inner of futures::io::{BufReader,BufWriter} not require inner trait bound #2848
Conversation
Thanks for the PR. I'm in favor of accepting this as std::io::BufReader does the same thing. That said, I think it would be good to remove the bound from not only these accessors, but also from non constructor methods such as |
I totally agree, I do the same thing on other non custructor methods just now. |
…BufReader,BufWriter} not require inner trait bound
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!
…t require inner trait bound (#2848)
…t require inner trait bound (#2848)
…t require inner trait bound (#2848)
Currently, accessing the inner of
futures::io::{BufReader, BufWriter}
requires that the inner type implementsAsyncRead
orAsyncWrite
. This constraint is much stricter than the semantics of inner access require. Removing the trait bound would be helpful in cases where pass-through functions simply obtain a reference to the inner I/O object for further use, without having to specify the inner trait bound explicitly.