From c5e2713b5168f97bd0112216d33acfe584a41870 Mon Sep 17 00:00:00 2001 From: colin Date: Fri, 29 Jul 2022 16:07:07 -0700 Subject: [PATCH] remove unused enum_dispatch --- Cargo.lock | 13 ------------- crates/coremem/Cargo.toml | 1 - crates/coremem/src/sim/legacy/mat/mod.rs | 6 ------ 3 files changed, 20 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 1e3a882..ad8a2d8 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -318,7 +318,6 @@ dependencies = [ "csv", "dashmap", "dyn-clone", - "enum_dispatch", "env_logger", "float_eq", "font8x8", @@ -578,18 +577,6 @@ version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3f107b87b6afc2a64fd13cac55fe06d6c8859f12d4b14cbcdd2c67d0976781be" -[[package]] -name = "enum_dispatch" -version = "0.3.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0eb359f1476bf611266ac1f5355bc14aeca37b299d0ebccc038ee7058891c9cb" -dependencies = [ - "once_cell", - "proc-macro2", - "quote", - "syn", -] - [[package]] name = "env_logger" version = "0.9.0" diff --git a/crates/coremem/Cargo.toml b/crates/coremem/Cargo.toml index 62a00f2..7f8d5af 100644 --- a/crates/coremem/Cargo.toml +++ b/crates/coremem/Cargo.toml @@ -16,7 +16,6 @@ crossterm = "0.24" # MIT csv = "1.1" # MIT or Unlicense dashmap = "5.3" # MIT dyn-clone = "1.0" # MIT or Apache 2.0 -enum_dispatch = "0.3" # MIT or Apache 2.0 env_logger = "0.9" # MIT or Apache 2.0 float_eq = "1.0" # MIT or Apache 2.0 font8x8 = "0.3" # MIT diff --git a/crates/coremem/src/sim/legacy/mat/mod.rs b/crates/coremem/src/sim/legacy/mat/mod.rs index dd3c84f..d3ffec4 100644 --- a/crates/coremem/src/sim/legacy/mat/mod.rs +++ b/crates/coremem/src/sim/legacy/mat/mod.rs @@ -2,7 +2,6 @@ use crate::real::Real; use crate::sim::legacy::{CellState, PmlParameters, PmlState, StepParameters, StepParametersMut}; use crate::cross::vec::Vec3; -use enum_dispatch::enum_dispatch; use serde::{Serialize, Deserialize}; pub mod db; @@ -20,8 +19,6 @@ pub use coremem_cross::mat::{ }; pub use linear::*; -// TODO: remove enum_dispatch -#[enum_dispatch] pub trait Material { fn step_parameters_mut<'a>(&'a mut self) -> StepParametersMut<'a, R> { // by default, behave as a vacuum @@ -129,7 +126,6 @@ impl Material for Pml { material_compat!(R, Pml); -// #[enum_dispatch(Material)] #[derive(Clone, PartialEq, Serialize, Deserialize)] pub enum GenericMaterial { Conductor(AnisomorphicConductor), @@ -228,7 +224,6 @@ impl Material for GenericMaterial { } material_compat!(R, GenericMaterial); -// #[enum_dispatch(Material)] #[derive(Clone, Serialize, Deserialize)] pub enum GenericMaterialNoPml { Conductor(AnisomorphicConductor), @@ -288,7 +283,6 @@ material_compat!(R, GenericMaterialNoPml); /// Materials which have only 1 Vec3. -// #[enum_dispatch(Material)] #[derive(Clone, Serialize, Deserialize)] pub enum GenericMaterialOneField { Conductor(AnisomorphicConductor),