luaur-analysis 0.1.3

Luau type checker and type inference (Rust).
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
use crate::records::ordered_map::OrderedMap;
use luaur_common::records::dense_hash_table::DenseDefault;

impl<K, V> OrderedMap<K, V>
where
    K: Clone + core::hash::Hash + Eq + Default,
    V: Clone + DenseDefault,
{
    pub fn push(&mut self, k: K, v: V) {
        self.keys.push(k.clone());
        *self.pairings.get_or_insert(k) = v;
    }
}