Stupid question time...
I want to use a crossbeam_channel to send data between threads, I know the type of the data I want to send, but can't figure out how to instantiate the channel and specify what kind of data to expect.
The examples I can find all infer the type based on what type is sent through it. But I haven't written that code yet.
error[E0282]: type annotations needed
--> src/main.rs:34:34
|
34 | let (a_sender, a_receiver) = crossbeam_channel::unbounded();
| ---------------------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot infer type for `T`
| |
| consider giving the pattern a type
error: aborting due to previous error
Thanks,
-kb