redsift / rkdb

kdb+ Rust embedding and IPC
MIT License
17 stars 6 forks source link

Fix cast between differently-aligned pointers #9

Closed peterjoel closed 4 years ago

peterjoel commented 4 years ago

Fixes the following error, reported by clippy:

error: casting from `*const u8` to a more-strictly-aligned pointer (`*const usize`) (1 < 8 bytes)
  --> src/kbindings.rs:59:16
   |
59 |         &mut *((u as *const usize).offset(1) as *mut T)
   |                ^^^^^^^^^^^^^^^^^^^
   |
rsdy commented 4 years ago

Thanks a lot for this batch of PRs, really good stuff!

peterjoel commented 4 years ago

@rsdy No worries! Are you actively using this crate in production?

rsdy commented 4 years ago

We are, but not every part of the library. It's been lacking some love recently as it is generally quite stable on the code paths that we do use.