aboutsummaryrefslogtreecommitdiff
path: root/src/stream/try_stream/try_unfold.rs
diff options
context:
space:
mode:
authorJoel Galenson <jgalenson@google.com>2021-05-19 15:35:43 -0700
committerJoel Galenson <jgalenson@google.com>2021-05-19 15:35:43 -0700
commit7a983027b4201001428e686717aad76b0bc2415a (patch)
tree1be59395194546600d1021ad77556b503bc5e58b /src/stream/try_stream/try_unfold.rs
parent4fa481b6ab8716e64dc7db0fb1f2c533a7685183 (diff)
downloadfutures-util-7a983027b4201001428e686717aad76b0bc2415a.tar.gz
Upgrade rust/crates/futures-util to 0.3.15
Test: make Change-Id: Ibac5fc0ece362434ec0af181cfd9860570da7813
Diffstat (limited to 'src/stream/try_stream/try_unfold.rs')
-rw-r--r--src/stream/try_stream/try_unfold.rs16
1 files changed, 3 insertions, 13 deletions
diff --git a/src/stream/try_stream/try_unfold.rs b/src/stream/try_stream/try_unfold.rs
index 258c18e..fd9cdf1 100644
--- a/src/stream/try_stream/try_unfold.rs
+++ b/src/stream/try_stream/try_unfold.rs
@@ -61,11 +61,7 @@ where
F: FnMut(T) -> Fut,
Fut: TryFuture<Ok = Option<(Item, T)>>,
{
- assert_stream::<Result<Item, Fut::Error>, _>(TryUnfold {
- f,
- state: Some(init),
- fut: None,
- })
+ assert_stream::<Result<Item, Fut::Error>, _>(TryUnfold { f, state: Some(init), fut: None })
}
pin_project! {
@@ -85,10 +81,7 @@ where
Fut: fmt::Debug,
{
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
- f.debug_struct("TryUnfold")
- .field("state", &self.state)
- .field("fut", &self.fut)
- .finish()
+ f.debug_struct("TryUnfold").field("state", &self.state).field("fut", &self.fut).finish()
}
}
@@ -99,10 +92,7 @@ where
{
type Item = Result<Item, Fut::Error>;
- fn poll_next(
- self: Pin<&mut Self>,
- cx: &mut Context<'_>,
- ) -> Poll<Option<Self::Item>> {
+ fn poll_next(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Option<Self::Item>> {
let mut this = self.project();
if let Some(state) = this.state.take() {