diff --git a/src/conversions.rs b/src/conversions.rs index 4cc5e1f..0e89b4b 100644 --- a/src/conversions.rs +++ b/src/conversions.rs @@ -21,14 +21,14 @@ fn get_conversion(unit: NonMetric) -> Conversion { match unit { // Length - NonMetric::Foot => Conversion { - from: inch_from, - to: MetricQuantity { amount: 12.0 * inch_to, unit: Metric::Metre }, - }, NonMetric::Inch => Conversion { from: inch_from, to: MetricQuantity { amount: inch_to, unit: Metric::Metre }, }, + NonMetric::Foot => Conversion { + from: inch_from, + to: MetricQuantity { amount: 12.0 * inch_to, unit: Metric::Metre }, + }, NonMetric::Yard => Conversion { from: inch_from, to: MetricQuantity { amount: 3.0 * 12.0 * inch_to, unit: Metric::Metre }, diff --git a/src/units.rs b/src/units.rs index dca8437..6e13eff 100644 --- a/src/units.rs +++ b/src/units.rs @@ -7,10 +7,10 @@ pub enum Metric { #[derive(Clone, Copy, Debug, PartialEq)] pub enum NonMetric { // Length - Foot, Inch, - Mile, + Foot, Yard, + Mile, // Weight Ounce, Pound,