chore(api) Allow complex types.

This commit is contained in:
Ivan Enderlin
2020-06-09 15:47:27 +02:00
parent 5c7cb75458
commit e975925cf2
2 changed files with 3 additions and 0 deletions

View File

@@ -313,6 +313,7 @@ trait VMDynamicFunction {
}
struct VMDynamicFunctionWithoutEnv {
#[allow(clippy::type_complexity)]
func: Box<dyn Fn(&[Val]) -> Result<Vec<Val>, RuntimeError> + 'static>,
function_type: FunctionType,
}
@@ -330,6 +331,7 @@ struct VMDynamicFunctionWithEnv<Env>
where
Env: Sized,
{
#[allow(clippy::type_complexity)]
func: Box<dyn Fn(&mut Env, &[Val]) -> Result<Vec<Val>, RuntimeError> + 'static>,
env: *mut Env,
function_type: FunctionType,

View File

@@ -45,6 +45,7 @@ pub trait LikeNamespace {
#[derive(Clone, Default)]
pub struct ImportObject {
map: Arc<Mutex<HashMap<String, Box<dyn LikeNamespace>>>>,
#[allow(clippy::type_complexity)]
pub(crate) state_creator: Option<Arc<dyn Fn() -> (*mut c_void, fn(*mut c_void)) + 'static>>,
/// Allow missing functions to be generated and instantiation to continue when required
/// functions are not provided.