hyperium / h2

HTTP 2.0 client & server implementation for Rust.
MIT License
1.34k stars 269 forks source link

Change a debug_assert to assert #613

Open nox opened 2 years ago

nox commented 2 years ago

This is already asserted a few lines later anyway when calling self.flow.send_data(len) in the "updating connection flow" span.

seanmonstar commented 2 years ago

By making this change, is it catching a bug and triggering a panic?

nox commented 2 years ago

It's changing a panic a bit. I'm trying to debug a bug we have at work about the assertion self.window_size >= sz as usize in FlowControl::send_data as described in https://github.com/hyperium/h2/issues/607. AFAIK this is the same as this debug_assert.