Clean up lifetimes after LuaCallback typedef change
This commit is contained in:
parent
bf6ef3ecad
commit
8b6425dc39
|
@ -998,7 +998,7 @@ impl<'lua, T: UserData> UserDataMethods<'lua, T> {
|
||||||
/// [`add_method_mut`]: #method.add_method_mut
|
/// [`add_method_mut`]: #method.add_method_mut
|
||||||
pub fn add_function<F>(&mut self, name: &str, function: F)
|
pub fn add_function<F>(&mut self, name: &str, function: F)
|
||||||
where
|
where
|
||||||
F: 'lua + for<'a> FnMut(&'lua Lua, MultiValue<'lua>) -> Result<MultiValue<'lua>>,
|
F: 'lua + FnMut(&'lua Lua, MultiValue<'lua>) -> Result<MultiValue<'lua>>,
|
||||||
{
|
{
|
||||||
self.methods.insert(name.to_owned(), Box::new(function));
|
self.methods.insert(name.to_owned(), Box::new(function));
|
||||||
}
|
}
|
||||||
|
@ -1040,7 +1040,7 @@ impl<'lua, T: UserData> UserDataMethods<'lua, T> {
|
||||||
/// userdata of type `T`.
|
/// userdata of type `T`.
|
||||||
pub fn add_meta_function<F>(&mut self, meta: MetaMethod, function: F)
|
pub fn add_meta_function<F>(&mut self, meta: MetaMethod, function: F)
|
||||||
where
|
where
|
||||||
F: 'lua + for<'a> FnMut(&'lua Lua, MultiValue<'lua>) -> Result<MultiValue<'lua>>,
|
F: 'lua + FnMut(&'lua Lua, MultiValue<'lua>) -> Result<MultiValue<'lua>>,
|
||||||
{
|
{
|
||||||
self.meta_methods.insert(meta, Box::new(function));
|
self.meta_methods.insert(meta, Box::new(function));
|
||||||
}
|
}
|
||||||
|
@ -1383,7 +1383,7 @@ impl Lua {
|
||||||
/// Wraps a Rust function or closure, creating a callable Lua function handle to it.
|
/// Wraps a Rust function or closure, creating a callable Lua function handle to it.
|
||||||
pub fn create_function<'lua, F>(&'lua self, func: F) -> Function<'lua>
|
pub fn create_function<'lua, F>(&'lua self, func: F) -> Function<'lua>
|
||||||
where
|
where
|
||||||
F: 'lua + for<'a> FnMut(&'a Lua, MultiValue<'a>) -> Result<MultiValue<'a>>,
|
F: 'lua + FnMut(&'lua Lua, MultiValue<'lua>) -> Result<MultiValue<'lua>>,
|
||||||
{
|
{
|
||||||
self.create_callback_function(Box::new(func))
|
self.create_callback_function(Box::new(func))
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue