You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The StreamCDC struct currently contains a Box<dyn Read>, which requires an additional heap allocation and potentially prevents some compiler optimisations by obscuring the reader type.
Is there a particular reason for this Box that isn't immediately obvious, or would you accept a change to parameterise StreamCDC over an R: Read, such that monomorphisation can occur?
Thanks for this crate! :)
The text was updated successfully, but these errors were encountered:
It was that way because I didn't know any better. In an effort to learn Rust more thoroughly I went ahead and made the change. Thank you for pointing it out, and offering to fix it.
This removes the use of Box::new, switching fastcdc to version 3.0.2
with nlfiedler/fastcdc-rs#25 fixed.
Change-Id: I64f388b9e0a7f358e25a8bb7ca0e4df1d3bb01c4
Reviewed-on: https://cl.tvl.fyi/c/depot/+/8249
Tested-by: BuildkiteCI
Reviewed-by: raitobezarius <tvl@lahfa.xyz>
Reviewed-by: tazjin <tazjin@tvl.su>
Autosubmit: flokli <flokli@flokli.de>
Hey!
The
StreamCDC
struct currently contains aBox<dyn Read>
, which requires an additional heap allocation and potentially prevents some compiler optimisations by obscuring the reader type.Is there a particular reason for this Box that isn't immediately obvious, or would you accept a change to parameterise StreamCDC over an
R: Read
, such that monomorphisation can occur?Thanks for this crate! :)
The text was updated successfully, but these errors were encountered: