Open s3bk opened 3 years ago
Yup, #4 is pretty much about the same thing. The fix would be to remove it, along with the hamming distance functions that rely on reading bytes as aligned integers. I believe that none of the main, re-exported functions actually use this (SIMD functions rely on unaligned reads), so it should be easily removable. An alternative is to use the ptr::read_unaligned
function for safely reading unaligned bytes as integers.
It allocates with a different alignment than it drops. It has to return a custom type that drops with the same layout as it allocates.