Rename ToFfi to IntoFfi

This commit is contained in:
2025-06-24 11:42:11 +10:00
parent cadf0a8551
commit 45db380466
6 changed files with 176 additions and 193 deletions

View File

@@ -60,7 +60,8 @@ fn generate_type(ty: &Ident) -> Result<TokenStream> {
}
}
unsafe impl #ffi::ToFfi for #ty {
// SAFETY: we can always implement `IntoFfi` because it transfers ownership from Rust to Lua
unsafe impl #ffi::IntoFfi for #ty {
type To = Self;
fn convert(self) -> Self::To { self }
}