Can't parse units added to existing quantities
Netzwerk2 opened this issue · 1 comments
Netzwerk2 commented
Units which are added to existing quantities fail to parse.
Minimal example:
#[macro_use]
extern crate uom;
use std::str::FromStr;
use uom::si::f64::Length;
unit! {
system: uom::si;
quantity: uom::si::length;
@smoot: 1.702; "smoot", "smoot", "smoots";
}
fn main() {
dbg!(Length::from_str("1 smoot").unwrap());
}
Netzwerk2 commented
Macro to implement a set of measurement units. Note that units manually defined using this macro will not be included in the quantity unit enum or associated functions, or in the FromStr implementation.
Found out that this is already mentioned in the unit
macro docs.