We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3a46841 commit 3b7a75bCopy full SHA for 3b7a75b
src/client/body/stream.rs
@@ -87,7 +87,12 @@ impl Streamer {
87
match frame {
88
Ok(bytes) => Ok(Frame::Bytes(PyBuffer::from(bytes))),
89
Err(Ok(trailers)) => Ok(Frame::Trailers(HeaderMap(trailers))),
90
- Err(Err(_)) => Err(error().into()),
+ Err(Err(frame)) => {
91
+ // This branch should be unreachable, as `http_body::Frame` can only be `Data` or `Trailers`.
92
+ // The `debug_assert!` will help catch any future changes that violate this assumption.
93
+ debug_assert!(false, "Unexpected frame type: {:?}", frame);
94
+ Err(error().into())
95
+ }
96
}
97
98
0 commit comments