loro
loro copied to clipboard
[LORO-345] Reduce WASM size by reduce the use of generic in rich text
Avoid the usage like this:
let (c, entity_index) = match pos_type {
PosType::Bytes => todo!(),
PosType::Unicode => self.find_best_insert_pos::<UnicodeQueryT>(pos),
PosType::Utf16 => self.find_best_insert_pos::<Utf16QueryT>(pos),
PosType::Entity => self.find_best_insert_pos::<EntityQueryT>(pos),
PosType::Event => self.find_best_insert_pos::<EventIndexQueryT>(pos),
};
From SyncLinear.com | LORO-345