Fixed a tricky type erasure bug in the scheduler

This commit is contained in:
2023-10-12 14:36:59 +01:00
parent af3e9f67fa
commit cb395da894
32 changed files with 147 additions and 125 deletions

View File

@@ -37,8 +37,7 @@ pub trait StrictEq {
}
/// Functionality the interpreter needs to handle a value
pub trait Atomic:
Any + Debug + DynClone + StrictEq + Responder + Send
pub trait Atomic: Any + Debug + DynClone + StrictEq + Responder + Send
where
Self: 'static,
{

View File

@@ -3,7 +3,7 @@ use std::fmt::{Debug, Display};
use std::hash::Hash;
use std::rc::Rc;
use dyn_clone::{DynClone, clone_box};
use dyn_clone::{clone_box, DynClone};
use super::XfnResult;
use crate::interpreted::ExprInst;
@@ -81,7 +81,5 @@ impl ExFn {
}
}
impl Clone for ExFn {
fn clone(&self) -> Self {
Self(clone_box(self.0.as_ref()))
}
fn clone(&self) -> Self { Self(clone_box(self.0.as_ref())) }
}

View File

@@ -11,7 +11,7 @@ mod inert;
use std::rc::Rc;
pub use atom::{Atom, Atomic, AtomicResult, AtomicReturn, StrictEq};
pub use extern_fn::{ExternError, ExternFn, ExFn};
pub use extern_fn::{ExFn, ExternError, ExternFn};
pub use fn_bridge::constructors::{
xfn_1ary, xfn_2ary, xfn_3ary, xfn_4ary, xfn_5ary, xfn_6ary, xfn_7ary,
xfn_8ary, xfn_9ary,