diff options
| author | Alexander Regueiro <alexreg@me.com> | 2019-02-09 22:16:58 +0000 |
|---|---|---|
| committer | Alexander Regueiro <alexreg@me.com> | 2019-02-10 23:57:25 +0000 |
| commit | 99ed06eb8864e704c4a1871ccda4648273bee4ef (patch) | |
| tree | fedfce65fa389e4fc58636bfbb9d9997656e3470 /src/libcore/task | |
| parent | b87363e7632b3f20f9b529696ffb5d5d9c3927cd (diff) | |
| download | rust-99ed06eb8864e704c4a1871ccda4648273bee4ef.tar.gz rust-99ed06eb8864e704c4a1871ccda4648273bee4ef.zip | |
libs: doc comments
Diffstat (limited to 'src/libcore/task')
| -rw-r--r-- | src/libcore/task/poll.rs | 10 | ||||
| -rw-r--r-- | src/libcore/task/wake.rs | 14 |
2 files changed, 12 insertions, 12 deletions
diff --git a/src/libcore/task/poll.rs b/src/libcore/task/poll.rs index ac656153519..c811f96ace3 100644 --- a/src/libcore/task/poll.rs +++ b/src/libcore/task/poll.rs @@ -22,7 +22,7 @@ pub enum Poll<T> { } impl<T> Poll<T> { - /// Change the ready value of this `Poll` with the closure provided + /// Changes the ready value of this `Poll` with the closure provided. pub fn map<U, F>(self, f: F) -> Poll<U> where F: FnOnce(T) -> U { @@ -32,7 +32,7 @@ impl<T> Poll<T> { } } - /// Returns whether this is `Poll::Ready` + /// Returns `true` if this is `Poll::Ready` #[inline] pub fn is_ready(&self) -> bool { match *self { @@ -41,7 +41,7 @@ impl<T> Poll<T> { } } - /// Returns whether this is `Poll::Pending` + /// Returns `true` if this is `Poll::Pending` #[inline] pub fn is_pending(&self) -> bool { !self.is_ready() @@ -49,7 +49,7 @@ impl<T> Poll<T> { } impl<T, E> Poll<Result<T, E>> { - /// Change the success value of this `Poll` with the closure provided + /// Changes the success value of this `Poll` with the closure provided. pub fn map_ok<U, F>(self, f: F) -> Poll<Result<U, E>> where F: FnOnce(T) -> U { @@ -60,7 +60,7 @@ impl<T, E> Poll<Result<T, E>> { } } - /// Change the error value of this `Poll` with the closure provided + /// Changes the error value of this `Poll` with the closure provided. pub fn map_err<U, F>(self, f: F) -> Poll<Result<T, U>> where F: FnOnce(E) -> U { diff --git a/src/libcore/task/wake.rs b/src/libcore/task/wake.rs index 3f7098f1ef9..6d54989706c 100644 --- a/src/libcore/task/wake.rs +++ b/src/libcore/task/wake.rs @@ -41,11 +41,11 @@ impl Waker { unsafe { self.inner.as_ref().wake() } } - /// Returns whether or not this `Waker` and `other` awaken the same task. + /// Returns `true` if or not this `Waker` and `other` awaken the same task. /// /// This function works on a best-effort basis, and may return false even /// when the `Waker`s would awaken the same task. However, if this function - /// returns true, it is guaranteed that the `Waker`s will awaken the same + /// returns `true`, it is guaranteed that the `Waker`s will awaken the same /// task. /// /// This function is primarily used for optimization purposes. @@ -54,7 +54,7 @@ impl Waker { self.inner == other.inner } - /// Returns whether or not this `Waker` and `other` `LocalWaker` awaken + /// Returns `true` if or not this `Waker` and `other` `LocalWaker` awaken /// the same task. /// /// This function works on a best-effort basis, and may return false even @@ -150,7 +150,7 @@ impl LocalWaker { unsafe { self.0.inner.as_ref().wake_local() } } - /// Returns whether or not this `LocalWaker` and `other` `LocalWaker` awaken the same task. + /// Returns `true` if or not this `LocalWaker` and `other` `LocalWaker` awaken the same task. /// /// This function works on a best-effort basis, and may return false even /// when the `LocalWaker`s would awaken the same task. However, if this function @@ -163,7 +163,7 @@ impl LocalWaker { self.0.will_wake(&other.0) } - /// Returns whether or not this `LocalWaker` and `other` `Waker` awaken the same task. + /// Returns `true` if or not this `LocalWaker` and `other` `Waker` awaken the same task. /// /// This function works on a best-effort basis, and may return false even /// when the `Waker`s would awaken the same task. However, if this function @@ -223,14 +223,14 @@ pub unsafe trait UnsafeWake: Send + Sync { /// Drops this instance of `UnsafeWake`, deallocating resources /// associated with it. /// - /// FIXME(cramertj) + // FIXME(cramertj): /// This method is intended to have a signature such as: /// /// ```ignore (not-a-doctest) /// fn drop_raw(self: *mut Self); /// ``` /// - /// Unfortunately in Rust today that signature is not object safe. + /// Unfortunately, in Rust today that signature is not object safe. /// Nevertheless it's recommended to implement this function *as if* that /// were its signature. As such it is not safe to call on an invalid /// pointer, nor is the validity of the pointer guaranteed after this |
