match has better line width balance
This commit is contained in:
parent
692697f82b
commit
aa1db9551e
@ -402,13 +402,13 @@ struct ClassMethods<'a>{
|
||||
impl ClassMethods<'_>{
|
||||
/// return self.methods[index] or create the function in the hashmap and then return it
|
||||
fn get_or_create_function(&mut self,lua:&mlua::Lua,index:&str)->mlua::Result<Option<mlua::Function>>{
|
||||
if let Some((&static_index_str,function_pointer))=self.method_pointers.get_entry(index){
|
||||
return Ok(Some(
|
||||
Ok(match self.method_pointers.get_entry(index){
|
||||
Some((&static_index_str,function_pointer))=>Some(
|
||||
self.methods.entry(static_index_str)
|
||||
.or_insert(lua.create_function(function_pointer)?)
|
||||
.clone()
|
||||
))
|
||||
}
|
||||
return Ok(None)
|
||||
),
|
||||
None=>None,
|
||||
})
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user