isaacholt100 / bnum

Arbitrary, fixed size numeric types that extend the functionality of primitive numeric types in Rust.
https://crates.io/crates/bnum
Other
67 stars 8 forks source link

from_be_slice/from_le_slice: Replace unsound `copy_nonoverlapping` with array-element copying loop #37

Closed Qqwy closed 7 months ago

Qqwy commented 7 months ago

Replaces unsound copy_nonoverlapping with an array-element copying loop. Since these are const fns, this does not affect runtime performance.

Fixes #36

isaacholt100 commented 7 months ago

Thanks @Qqwy for this, I had actually implemented this change (plus a few others which needed fixing for the same reason) just a few hours before you raised this, but appreciate it all the same! It's good to know that the runtime performance is not affected.