From b952a42d27df2b17842c5986992073c1b0bb3c9b Mon Sep 17 00:00:00 2001 From: Deadbeef Date: Thu, 24 Jun 2021 00:16:06 +0800 Subject: [PATCH] Removed an unused impl --- library/core/src/task/poll.rs | 53 ----------------------------------- 1 file changed, 53 deletions(-) diff --git a/library/core/src/task/poll.rs b/library/core/src/task/poll.rs index 9cf89623d888e..ce5a8a86a3025 100644 --- a/library/core/src/task/poll.rs +++ b/library/core/src/task/poll.rs @@ -128,32 +128,6 @@ impl From for Poll { } } -#[stable(feature = "futures_api", since = "1.36.0")] -#[cfg(bootstrap)] -impl ops::TryV1 for Poll> { - type Output = Poll; - type Error = E; - - #[inline] - fn into_result(self) -> Result { - match self { - Poll::Ready(Ok(x)) => Ok(Poll::Ready(x)), - Poll::Ready(Err(e)) => Err(e), - Poll::Pending => Ok(Poll::Pending), - } - } - - #[inline] - fn from_error(e: Self::Error) -> Self { - Poll::Ready(Err(e)) - } - - #[inline] - fn from_ok(x: Self::Output) -> Self { - x.map(Ok) - } -} - #[unstable(feature = "try_trait_v2", issue = "84277")] impl ops::TryV2 for Poll> { type Output = Poll; @@ -184,33 +158,6 @@ impl> ops::FromResidual> for Pol } } -#[stable(feature = "futures_api", since = "1.36.0")] -#[cfg(bootstrap)] -impl ops::TryV1 for Poll>> { - type Output = Poll>; - type Error = E; - - #[inline] - fn into_result(self) -> Result { - match self { - Poll::Ready(Some(Ok(x))) => Ok(Poll::Ready(Some(x))), - Poll::Ready(Some(Err(e))) => Err(e), - Poll::Ready(None) => Ok(Poll::Ready(None)), - Poll::Pending => Ok(Poll::Pending), - } - } - - #[inline] - fn from_error(e: Self::Error) -> Self { - Poll::Ready(Some(Err(e))) - } - - #[inline] - fn from_ok(x: Self::Output) -> Self { - x.map(|x| x.map(Ok)) - } -} - #[unstable(feature = "try_trait_v2", issue = "84277")] impl ops::TryV2 for Poll>> { type Output = Poll>;