Hi guys, I'm an absolute noob, just started playing with Rust and I have a basic question.
How to convert between types where I know the conversion is possible ?
In my case I want to convert from fon::chan::Ch32 to f32 and I am getting the error below.
use fon::{chan::Ch32, mono::Mono32, Audio, Stream};
How I try to convert:
let y_position= f32::from(y);
Error:
24 | let y_position= f32::from(y);
| ^^^^^^^^^ the trait `std::convert::From<&fon::sample::Sample1<fon::chan::Ch32>>` is not implemented for `f32`
A note, you can get monospaced content by using code fences (```) surrounding your code / error on new lines (helps with readability and makes people more like to engage as a result)