Skip to content

Commit 766fa85

Browse files
authored
chore: Refactor redundant pattern match (#2174)
1 parent 1a7a61d commit 766fa85

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

tonic/src/codec/decode.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -399,9 +399,8 @@ impl<T> Stream for Streaming<T> {
399399
return Poll::Ready(Some(Ok(item)));
400400
}
401401

402-
match ready!(self.inner.poll_frame(cx))? {
403-
Some(()) => (),
404-
None => break,
402+
if ready!(self.inner.poll_frame(cx))?.is_none() {
403+
break;
405404
}
406405
}
407406

0 commit comments

Comments
 (0)