Skip to content

Commit

Permalink
Don't clone function name when calling async userdata method
Browse files Browse the repository at this point in the history
  • Loading branch information
khvzak committed Dec 3, 2023
1 parent e4d6e92 commit a4c9192
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/userdata_impl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ impl<'lua, T: 'static> UserDataRegistry<'lua, T> {
MR: Future<Output = Result<R>> + 's,
R: IntoLuaMulti<'lua>,
{
let name = get_function_name::<T>(name);
let name = Arc::new(get_function_name::<T>(name));
let method = Arc::new(method);

Box::new(move |lua, mut args| unsafe {
Expand Down Expand Up @@ -312,7 +312,7 @@ impl<'lua, T: 'static> UserDataRegistry<'lua, T> {
MR: Future<Output = Result<R>> + 's,
R: IntoLuaMulti<'lua>,
{
let name = get_function_name::<T>(name);
let name = Arc::new(get_function_name::<T>(name));
let method = Arc::new(method);

Box::new(move |lua, mut args| unsafe {
Expand Down

0 comments on commit a4c9192

Please sign in to comment.