From ef811ecfa94176ca3c9d021e023feb778cd25dfd Mon Sep 17 00:00:00 2001 From: luaneko Date: Sat, 28 Jun 2025 06:06:39 +1000 Subject: [PATCH] Use faster fxhashset in registry --- crates/luaffi/src/lib.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/crates/luaffi/src/lib.rs b/crates/luaffi/src/lib.rs index 4e920e2..b3c4b6d 100644 --- a/crates/luaffi/src/lib.rs +++ b/crates/luaffi/src/lib.rs @@ -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, - decls: HashSet, + types: FxHashSet, + decls: FxHashSet, cdef: String, lua: String, }