Implement IntoLua for RegistryKey

This commit is contained in:
Alex Orlenko
2024-02-29 22:45:23 +00:00
parent 270b98a429
commit 83c075c72b
2 changed files with 26 additions and 6 deletions
+12
View File
@@ -421,6 +421,18 @@ impl<'lua> FromLua<'lua> for Error {
}
}
impl<'lua> IntoLua<'lua> for RegistryKey {
#[inline]
fn into_lua(self, lua: &'lua Lua) -> Result<Value<'lua>> {
lua.registry_value(&self)
}
#[inline]
unsafe fn push_into_stack(self, lua: &'lua Lua) -> Result<()> {
<&RegistryKey>::push_into_stack(&self, lua)
}
}
impl<'lua> IntoLua<'lua> for &RegistryKey {
#[inline]
fn into_lua(self, lua: &'lua Lua) -> Result<Value<'lua>> {