Use faster fxhashset in registry

This commit is contained in:
lumi 2025-06-28 06:06:39 +10:00
parent d9ef6c7806
commit ef811ecfa9
Signed by: luaneko
GPG Key ID: 406809B8763FF07A

View File

@ -3,8 +3,8 @@ use crate::{
string::{DROP_BUFFER_FN, IS_UTF8_FN, lua_buffer},
};
pub use luaffi_impl::*;
use rustc_hash::FxHashSet;
use std::{
collections::HashSet,
ffi::{c_double, c_float, c_void},
fmt::{self, Display, Formatter, Write},
marker::PhantomData,
@ -128,8 +128,8 @@ fn cache_local(f: &mut Formatter, list: &[(&str, &str)]) -> fmt::Result {
#[derive(Debug, Clone, Default)]
pub struct Registry {
types: HashSet<String>,
decls: HashSet<String>,
types: FxHashSet<String>,
decls: FxHashSet<String>,
cdef: String,
lua: String,
}