Describe the bug
ISO-3166-2 codes are parsed only when using an _ as the separator instead of the correct -. This means they don't round trip.
Minimal Reproducible Examples (MRE)
use codes_iso_3166::part_2::SubdivisionCode;
fn main() {
let subdivision: Result<SubdivisionCode, _> = SubdivisionCode::AD_07.code().parse();
if subdivision.is_err() {
panic!("{:?}", subdivision);
}
}
will output thread 'main' panicked at 'Err(UnknownValue { type_name: "SubdivisionCode", value: "AD-07" })', src/main.rs:6:9
Describe the bug
ISO-3166-2 codes are parsed only when using an
_as the separator instead of the correct-. This means they don't round trip.Minimal Reproducible Examples (MRE)
will output
thread 'main' panicked at 'Err(UnknownValue { type_name: "SubdivisionCode", value: "AD-07" })', src/main.rs:6:9