Skip to content

Commit

Permalink
Add doc for impl From for Waker
Browse files Browse the repository at this point in the history
  • Loading branch information
phungleson committed Oct 16, 2018
1 parent 8a7048b commit f8550a4
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/libcore/task/wake.rs
Expand Up @@ -188,6 +188,13 @@ impl LocalWaker {
}

impl From<LocalWaker> for Waker {
/// Converts a [`LocalWaker`] into a [`Waker`].
///
/// This conversion forgets local waker and allocates a new waker with
/// the same inner.
///
/// [`LocalWaker`]: struct.LocalWaker.html
/// [`Waker`]: struct.Waker.html
#[inline]
fn from(local_waker: LocalWaker) -> Self {
local_waker.0
Expand Down

0 comments on commit f8550a4

Please sign in to comment.