Skip to content

Commit 91cab98

Browse files
committed
Simplify implementation
1 parent 4bdc8da commit 91cab98

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/concurrent_stream/from_concurrent_stream.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -116,13 +116,13 @@ where
116116

117117
async fn progress(self: Pin<&mut Self>) -> super::ConsumerState {
118118
let mut this = self.project();
119+
let Ok(items) = this.output else {
120+
return ConsumerState::Break;
121+
};
119122

120123
while let Some(item) = this.group.next().await {
121124
match item {
122125
Ok(item) => {
123-
let Ok(items) = this.output else {
124-
panic!("progress called after returning ConsumerState::Break");
125-
};
126126
items.push(item);
127127
}
128128
Err(e) => {

0 commit comments

Comments
 (0)