Skip to content
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

Merged
merged 1 commit into from
Sep 3, 2019

Conversation

taiki-e
Copy link
Member

@taiki-e taiki-e commented Aug 30, 2019

Closes #1761

r? @cramertj

@@ -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);
Copy link
Member Author

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.)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done in 57686fd

@taiki-e taiki-e force-pushed the io-read_initializer branch 8 times, most recently from cff39cb to 43c5f14 Compare August 30, 2019 23:18
/// `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 {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is now safe.

@cramertj cramertj merged commit d0fe91b into rust-lang:master Sep 3, 2019
@taiki-e taiki-e deleted the io-read_initializer branch September 3, 2019 17:31
bors bot added a commit to async-rs/async-std that referenced this pull request Oct 1, 2019
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>
bors bot added a commit to async-rs/async-std that referenced this pull request Oct 1, 2019
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remove AsyncRead::initializer
2 participants