Skip to content

Commit

Permalink
fix naming
Browse files Browse the repository at this point in the history
  • Loading branch information
younies committed Nov 30, 2023
1 parent 9fcf51a commit 05781af
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions experimental/unitsconversion/src/provider.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,9 @@ pub struct UnitsInfoV1<'data> {
)]
#[zerovec::derive(Debug)]
pub struct ConversionInfo<'data> {
/// Contains the base unit which the unit is converted to.
/// Contains the base unit (after parsing) which what the unit is converted to.
#[cfg_attr(feature = "serde", serde(borrow))]
pub base_unit: ZeroVec<'data, MeasureUnitItem>,
pub basic_units: ZeroVec<'data, MeasureUnitItem>,

/// Represents the numerator of the conversion factor.
#[cfg_attr(feature = "serde", serde(borrow))]
Expand Down
2 changes: 1 addition & 1 deletion provider/datagen/src/transform/cldr/units/helpers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ pub fn extract_conversion_info<'data>(
};

Ok(ConversionInfo {
base_unit: ZeroVec::from_iter(base_unit),
basic_units: ZeroVec::from_iter(base_unit),
factor_num: factor_num.into(),
factor_den: factor_den.into(),
factor_sign,
Expand Down
6 changes: 3 additions & 3 deletions provider/datagen/src/transform/cldr/units/info.rs
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ fn test_basic() {
let meter_convert: ConversionInfo = ZeroFrom::zero_from(meter_convert_ule);

assert_eq!(meter_convert.factor_sign, Sign::Positive);
let meter_convert_base_unit = meter_convert.base_unit.to_owned();
let meter_convert_base_unit = meter_convert.basic_units.to_owned();
assert_eq!(
meter_convert_base_unit.get(0).unwrap().unit_id,
meter_index as u16
Expand All @@ -151,7 +151,7 @@ fn test_basic() {
assert_eq!(
meter_convert,
ConversionInfo {
base_unit: {
basic_units: {
let base_unit = vec![MeasureUnitItem {
power: 1,
si_prefix: SiPrefix {
Expand Down Expand Up @@ -180,7 +180,7 @@ fn test_basic() {
assert_eq!(
foot_convert,
ConversionInfo {
base_unit: {
basic_units: {
let base_unit = vec![MeasureUnitItem {
power: 1,
si_prefix: SiPrefix {
Expand Down

0 comments on commit 05781af

Please sign in to comment.