Skip to content

Revisit Implementation of Offset Numerator and Denominator in Units Conversion #4311

Open
@younies

Description

@younies

Description

In the experimental/unitsconversion/src/provider.rs file, we have the following fields in the ConversionInfo struct:

/// Represents the numerator of the offset.
#[cfg_attr(feature = "serde", serde(borrow))]
pub offset_num: ZeroVec<'data, u8>,

/// Represents the denominator of the offset.
#[cfg_attr(feature = "serde", serde(borrow))]
pub offset_den: ZeroVec<'data, u8>,

from @sffc :
Since these are usually unused, I wonder whether we can represent them more compactly. Currently they get an entry in the multi-field ULE that #[make_varule] generates.

Metadata

Metadata

Assignees

Labels

C-numbersComponent: Numbers, units, currenciesT-techdebtType: ICU4X code health and tech debt

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions