Fixed variable names

This commit is contained in:
2023-06-11 16:52:23 -07:00
parent e59cfac837
commit 28c1a84b80
4 changed files with 297 additions and 297 deletions

View File

@ -7,7 +7,7 @@ use std::ops::{
use crate::quantity::Scalar;
use crate::quantity::Quantity;
use super::FreeUnit;
use super::UnitBase;
use super::WholeUnit;
use super::Prefix;
use super::fromstring_db;
use super::str_to_prefix;
@ -203,14 +203,14 @@ impl Unit {
match s {
$(
// No prefix--every unit has this
$string => Some(FreeUnit::from_base($unit)),
$string => Some(FreeUnit::from_whole($unit)),
// Arms for prefixes
$($(
concat!(
$prefix,
$string
) => Some(FreeUnit::from_base_prefix($unit, str_to_prefix!($prefix))),
) => Some(FreeUnit::from_whole_prefix($unit, str_to_prefix!($prefix))),
)*)*
)*
_ => None