AbstractMeasurement: remove the DynClone requirement
This commit is contained in:
@@ -2,17 +2,13 @@ use crate::geom::{Meters, Region, Torus, WorldRegion};
|
||||
use crate::real::{Real as _, ToFloat as _};
|
||||
use crate::cross::vec::Vec3;
|
||||
use crate::sim::GenericSim;
|
||||
use dyn_clone::{self, DynClone};
|
||||
use indexmap::IndexMap;
|
||||
use serde::{Serialize, Deserialize};
|
||||
|
||||
// TODO: remove this Clone and Send requirement? Have Measurements be shared by-reference across
|
||||
// threads? i.e. Sync, and no Clone
|
||||
pub trait AbstractMeasurement: Send + Sync + DynClone {
|
||||
pub trait AbstractMeasurement: Send + Sync {
|
||||
fn eval(&self, state: &dyn GenericSim) -> String;
|
||||
fn key_value(&self, state: &dyn GenericSim) -> IndexMap<String, String>;
|
||||
}
|
||||
dyn_clone::clone_trait_object!(AbstractMeasurement);
|
||||
|
||||
/// create one IndexMap out of several measurements
|
||||
pub fn eval_multiple_kv(state: &dyn GenericSim, meas: &[&dyn AbstractMeasurement]) -> IndexMap<String, String> {
|
||||
|
Reference in New Issue
Block a user