Closed nrempel closed 1 year ago
Should be fine, but please be aware that cloning Crc
also clones the table, which can be on the order of 16 KiB for 32-bit crc. So, I wouldn't recommend it.
Hm, yeah that's not ideal. I'll look at avoiding the clone here. Thanks.
@nrempel you could define a const &'static Crc
value and then clone that. e.g: https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=4d36d676a9093586048b76018504a1df.
Thanks @akhilles, I ended up using once_cell::sync::Lazy
which works well for my case.
Hi there,
Would you consider deriving Clone for Crc? This would make the crate more convenient to use.
Thanks!