-
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 AsyncRead::initializer unstable API #1845
Conversation
futures-io/src/lib.rs
Outdated
@@ -42,9 +45,11 @@ mod if_std { | |||
|
|||
/// A type used to conditionally initialize buffers passed to `AsyncRead` | |||
/// methods, modeled after `std`. | |||
#[cfg(feature = "read_initializer")] | |||
#[derive(Debug)] | |||
pub struct Initializer(bool); |
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.
Is it better to re-export the std ones instead of our own ones? (The stability of this feature depends on 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.
Done in 57686fd
cff39cb
to
43c5f14
Compare
/// `unsafe` because the `io::Read` type must not access the buffer | ||
/// before reading data into it. | ||
macro_rules! unsafe_delegate_async_read_to_stdio { | ||
macro_rules! delegate_async_read_to_stdio { |
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.
This is now safe.
43c5f14
to
c42c7ab
Compare
255: Update futures-preview to 0.3.0-alpha.19 r=skade a=taiki-e Depends on http-rs/surf#74 Refs: * rust-lang/futures-rs#1761 * rust-lang/futures-rs#1845 cc @skade @stjepang @yoshuawuyts Co-authored-by: Taiki Endo <te316e89@gmail.com>
255: Update futures-preview to 0.3.0-alpha.19 r=skade a=taiki-e Depends on http-rs/surf#74 Refs: * rust-lang/futures-rs#1761 * rust-lang/futures-rs#1845 cc @skade @stjepang @yoshuawuyts Co-authored-by: Taiki Endo <te316e89@gmail.com>
Closes #1761
r? @cramertj