I'm pretty new to this library, but I think I found a bug concerning multiplication of different quantities.
Multiplying InformationRate and Time should result in Information, at least I would assume this and as far as I can see from the example, this type of multiplication should be possible.
Here a MVE that illustrates the problem:
use uom::si::f32::*;
use uom::si::information_rate::byte_per_second;
use uom::si::time::second;
use uom::si::information::byte;
fn main() {
let r = InformationRate::new::<byte_per_second>(10.0);
let t = Time::new::<second>(1.0);
let b = r * t;
let _ = b.get::<byte>();
}
According to the compiler error, it produces a ratio:
❯ cargo build
Compiling mve v0.1.0 (/home/sven/Documents/mve)
error[E0277]: the trait bound `uom::si::information::byte: uom::si::ratio::Unit` is not satisfied
--> src/main.rs:11:15
|
11 | let _ = b.get::<byte>();
| ^^^ the trait `uom::si::ratio::Unit` is not implemented for `uom::si::information::byte`
error: aborting due to previous error
I'm pretty new to this library, but I think I found a bug concerning multiplication of different quantities.
Multiplying
InformationRateandTimeshould result inInformation, at least I would assume this and as far as I can see from the example, this type of multiplication should be possible.Here a MVE that illustrates the problem:
According to the compiler error, it produces a
ratio: