amazon-ion / ion-schema-rust

Rust implementation of Ion Schema
https://amazon-ion.github.io/ion-schema/sandbox
Apache License 2.0
13 stars 6 forks source link

Replace `core_types_by_id` `HashMap` to use `IonType` instead of `String` as key #50

Open desaikd opened 2 years ago

desaikd commented 2 years ago

Current implementation of TypeStore and PendingTypes uses HashMap<String,TyepId> to represent core_types_by_id.

#[derive(Debug, Clone)]
pub struct PendingTypes {
    core_type_ids_by_ion_type: HashMap<String, TypeId>,
}

Once we have an implementation of Hash, Ord in ion-rust we can replace this to be HashMap<IonType, TypeId>.