kevinmehall / rust-soapysdr

Rust bindings for SoapySDR, the vendor-neutral software defined radio hardware abstraction layer
Apache License 2.0
79 stars 22 forks source link

Update num-complex dependency from 0.2 to 0.4 #17

Closed newAM closed 3 years ago

newAM commented 3 years ago

I ran into an error that looked like this:

error[E0277]: the trait bound `Complex<f32>: StreamSample` is not satisfied
   --> src/main.rs:15:46
    |
15  |     let mut stream: RxStream<Complex<f32>> = dev.rx_stream::<Complex<f32>>(&[0]).unwrap();
    |                                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `StreamSample` is not implemented for `Complex<f32>`
    | 

Turns out it was just a version mismatch with complex-num.

Release notes here: https://github.com/rust-num/num-complex/blob/master/RELEASES.md