about summary refs log tree commit diff
path: root/src/libcore/task/poll.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/libcore/task/poll.rs')
-rw-r--r--src/libcore/task/poll.rs20
1 files changed, 11 insertions, 9 deletions
diff --git a/src/libcore/task/poll.rs b/src/libcore/task/poll.rs
index fec17c4d1a4..d567ae54577 100644
--- a/src/libcore/task/poll.rs
+++ b/src/libcore/task/poll.rs
@@ -11,10 +11,7 @@ use crate::result::Result;
 pub enum Poll<T> {
     /// Represents that a value is immediately ready.
     #[stable(feature = "futures_api", since = "1.36.0")]
-    Ready(
-        #[stable(feature = "futures_api", since = "1.36.0")]
-        T
-    ),
+    Ready(#[stable(feature = "futures_api", since = "1.36.0")] T),
 
     /// Represents that a value is not ready yet.
     ///
@@ -29,7 +26,8 @@ impl<T> Poll<T> {
     /// Changes the ready value of this `Poll` with the closure provided.
     #[stable(feature = "futures_api", since = "1.36.0")]
     pub fn map<U, F>(self, f: F) -> Poll<U>
-        where F: FnOnce(T) -> U
+    where
+        F: FnOnce(T) -> U,
     {
         match self {
             Poll::Ready(t) => Poll::Ready(f(t)),
@@ -59,7 +57,8 @@ impl<T, E> Poll<Result<T, E>> {
     /// Changes the success value of this `Poll` with the closure provided.
     #[stable(feature = "futures_api", since = "1.36.0")]
     pub fn map_ok<U, F>(self, f: F) -> Poll<Result<U, E>>
-        where F: FnOnce(T) -> U
+    where
+        F: FnOnce(T) -> U,
     {
         match self {
             Poll::Ready(Ok(t)) => Poll::Ready(Ok(f(t))),
@@ -71,7 +70,8 @@ impl<T, E> Poll<Result<T, E>> {
     /// Changes the error value of this `Poll` with the closure provided.
     #[stable(feature = "futures_api", since = "1.36.0")]
     pub fn map_err<U, F>(self, f: F) -> Poll<Result<T, U>>
-        where F: FnOnce(E) -> U
+    where
+        F: FnOnce(E) -> U,
     {
         match self {
             Poll::Ready(Ok(t)) => Poll::Ready(Ok(t)),
@@ -85,7 +85,8 @@ impl<T, E> Poll<Option<Result<T, E>>> {
     /// Changes the success value of this `Poll` with the closure provided.
     #[unstable(feature = "poll_map", issue = "63514")]
     pub fn map_ok<U, F>(self, f: F) -> Poll<Option<Result<U, E>>>
-        where F: FnOnce(T) -> U
+    where
+        F: FnOnce(T) -> U,
     {
         match self {
             Poll::Ready(Some(Ok(t))) => Poll::Ready(Some(Ok(f(t)))),
@@ -98,7 +99,8 @@ impl<T, E> Poll<Option<Result<T, E>>> {
     /// Changes the error value of this `Poll` with the closure provided.
     #[unstable(feature = "poll_map", issue = "63514")]
     pub fn map_err<U, F>(self, f: F) -> Poll<Option<Result<T, U>>>
-        where F: FnOnce(E) -> U
+    where
+        F: FnOnce(E) -> U,
     {
         match self {
             Poll::Ready(Some(Ok(t))) => Poll::Ready(Some(Ok(t))),