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

Change ArcWake::into_waker to a free function #1676

Merged
merged 2 commits into from
Jul 15, 2019

Conversation

taiki-e
Copy link
Member

@taiki-e taiki-e commented Jun 15, 2019

I feel this to be more consistent.

pub fn waker<W>(wake: Arc<W>) -> Waker where W: ArcWake;

pub fn waker_ref<W>(wake: &Arc<W>) -> WakerRef<'_> where W: ArcWake;

@cramertj
Copy link
Member

Part of the reason for doing it this way was to make the method more discoverable. I don't care particularly strongly about this change either way, but I think we need some extra documentation on the trait if we're going to make this a free function.

@taiki-e
Copy link
Member Author

taiki-e commented Jul 14, 2019

@cramertj Sorry for the late reply. I added documents for ArcWake -> Waker conversion in 1a3e8a4.

@cramertj
Copy link
Member

Works for me, then!

@cramertj cramertj merged commit af434e1 into rust-lang:master Jul 15, 2019
@taiki-e taiki-e deleted the arc-wake branch July 16, 2019 02:35
jakmeier added a commit to jakmeier/stdweb that referenced this pull request Aug 13, 2019
Syntax of cuntion has been changed
See rust-lang/futures-rs#1676
koute pushed a commit to koute/stdweb that referenced this pull request Aug 13, 2019
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.

2 participants