Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove the duplication of UnitsTrieV1 #5873

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion components/experimental/src/measure/provider/trie.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ pub use crate::provider::Baked;
#[cfg_attr(feature = "datagen", databake(path = icu_experimental::measure::provider::trie))]
#[cfg_attr(feature = "serde", derive(serde::Deserialize))]
pub struct UnitsTrieV1<'data> {
// TODO: remove this field from units/provider::UnitsInfoV1 once the `MeasureUnit` is fully used in the measurement units.
/// Maps from unit name (e.g. foot or meter) to its unit id. this id can be used to retrieve the conversion information from the `UnitsInfoV1`.
#[cfg_attr(feature = "serde", serde(borrow))]
pub trie: ZeroTrieSimpleAscii<ZeroVec<'data, u8>>,
Expand Down
5 changes: 0 additions & 5 deletions components/experimental/src/units/provider.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,6 @@ use super::ratio::IcuRatio;
#[cfg_attr(feature = "datagen", databake(path = icu_experimental::units::provider))]
#[cfg_attr(feature = "serde", derive(serde::Deserialize))]
pub struct UnitsInfoV1<'data> {
// TODO: remove this field once we are using this map from `measure/provider::UnitsTrie`.
/// Maps from unit name (e.g. foot) to it is conversion information.
#[cfg_attr(feature = "serde", serde(borrow))]
pub units_conversion_trie: ZeroTrieSimpleAscii<ZeroVec<'data, u8>>,

/// Contains the conversion information, such as the conversion rate and the base unit.
/// For example, the conversion information for the unit `foot` is `1 foot = 0.3048 meter`.
#[cfg_attr(feature = "serde", serde(borrow))]
Expand Down
Loading