rust-num / num-complex

Complex numbers for Rust
Apache License 2.0
231 stars 47 forks source link

Add support for `bytemuck` traits #100

Closed bradleyharden closed 2 years ago

bradleyharden commented 2 years ago

bytemuck seems to be the de facto standard crate for safe transmuting. Because Complex<T> is repr(C), it would satisfy the requirements for Zeroable and Pod, as long as T satisfies them as well.

Add optional implemenations of Zeroable and Pod, gated behind the bytemuck feature.

Closes #99

bradleyharden commented 2 years ago

@cuviper or anyone else, would you have a second to take a look at this?

cuviper commented 2 years ago

Can you add the feature to ci/test_full.sh? (Trivial as it is, we still ought to test it...)

bradleyharden commented 2 years ago

@cuviper, done

bradleyharden commented 2 years ago

Pinging this again. I think it's ready.

bradleyharden commented 2 years ago

Another bump. @cuviper?

cuviper commented 2 years ago

bors r+

bors[bot] commented 2 years ago

Build succeeded: