Region: remove Clone
from the trait, and also parameterize everything
i didn't necessarily *want* to parameterize it all, but it turned out to be easier to do that than to force all users to workaround the lack of Clone.
This commit is contained in:
@@ -212,7 +212,6 @@ impl<S: AbstractSim> AbstractMeasurement<S> for Meta {
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Clone)]
|
||||
pub struct Volume {
|
||||
name: String,
|
||||
region: Box<dyn Region>,
|
||||
@@ -241,7 +240,6 @@ impl<S: AbstractSim> AbstractMeasurement<S> for Volume {
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Clone)]
|
||||
pub struct Current {
|
||||
name: String,
|
||||
region: Box<dyn Region>,
|
||||
@@ -471,7 +469,6 @@ impl<S: AbstractSim> AbstractMeasurement<S> for MagneticLoop {
|
||||
}
|
||||
|
||||
/// mean M over a region
|
||||
#[derive(Clone)]
|
||||
pub struct MagneticFlux {
|
||||
name: String,
|
||||
region: Box<dyn Region>,
|
||||
@@ -508,7 +505,6 @@ impl<S: AbstractSim> AbstractMeasurement<S> for MagneticFlux {
|
||||
}
|
||||
|
||||
/// mean B over a region
|
||||
#[derive(Clone)]
|
||||
pub struct Magnetization {
|
||||
name: String,
|
||||
region: Box<dyn Region>,
|
||||
@@ -604,7 +600,6 @@ impl<S: AbstractSim> AbstractMeasurement<S> for ElectricField {
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Clone)]
|
||||
pub struct Energy {
|
||||
name: String,
|
||||
region: Box<dyn Region>,
|
||||
@@ -648,7 +643,6 @@ impl<S: AbstractSim> AbstractMeasurement<S> for Energy {
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Clone)]
|
||||
pub struct Power {
|
||||
name: String,
|
||||
region: Box<dyn Region>
|
||||
@@ -732,7 +726,6 @@ pub mod test {
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Clone, Serialize, Deserialize)]
|
||||
struct MockRegion {
|
||||
normal: Vec3<f32>,
|
||||
}
|
||||
|
Reference in New Issue
Block a user