Mike Boutin

Results 163 comments of Mike Boutin

`min`/`max` are implemented for `Quantity` when the underlying storage type is not a float through the `Ord` trait. This is the same as the standard library when the methods are...

Can you provide a link to your code if it's open source or a minimal example otherwise? You may need to do one of the following to get correct method...

Thanks for the example! As I expected method resolution is picking `fn max(...) where V: Float` over the `Ord::max` method and of course `u32` doesn't implement `Float`. I'm going to...

Excellent news, on my machine beta/nightly result in significant performance improvements. 1.61 times faster for a full build and 2.45 times faster for `uom` without dependencies! 16 seconds for `uom`...

I did some more review today. * https://github.com/rust-lang/rust/issues/50614 is still an issue, but isn't currently affecting `uom`. * Pre-expanding macros using `cargo expand` (and fixing errors so that the output...

Both could definitely exist and we could probably add a warning that `use_serde` is being used instead of `serde`.

https://github.com/iliekturtles/uom/blob/a77ef61e8db72cbdef40fabddeb0ed3506ad5ebc/src/tests/system.rs#L540-L543 `Num` crates use `Serde` 1.0 now. It also looks like all of the `uom` internal code checks for the `"serde"` feature which doesn't actually exist!

Thanks for the quick response @adamreichold! Similar to how the standard library doesn't impl `Ord` for floating point primitives I think it should be out of scope or `uom` as...

Re-opening to investigate supporting `ordered_float` behind a feature gate. See #216 for considerations about the feature name.

I've only briefly looked at the problem so far. I think what would need to be done is to pull conversion formulas (`from_base`, `to_base`, `change_base`) into `Conversion` (or sub-traits). The...