Skip to content

Commit

Permalink
Removed unnecessary Serialize/Deserialize derives
Browse files Browse the repository at this point in the history
In the tests there were still a few remnants of the times where
serialization and deserialization were more ingrained in the system.
This commit removes these remnants.
It also fixes a typo in the .gitignore file in argmin-testfunctions-py.
  • Loading branch information
stefan-k committed Feb 27, 2024
1 parent 3b3b259 commit dfa22bb
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 8 deletions.
3 changes: 0 additions & 3 deletions crates/argmin/src/core/solver.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,8 @@ use crate::core::{Error, Problem, State, TerminationReason, TerminationStatus, K
/// use argmin::core::{
/// ArgminFloat, Solver, IterState, CostFunction, Error, KV, Problem, TerminationReason, TerminationStatus
/// };
/// #[cfg(feature = "serde1")]
/// use serde::{Deserialize, Serialize};
///
/// #[derive(Clone)]
/// #[cfg_attr(feature = "serde1", derive(Serialize, Deserialize))]
/// struct OptimizationAlgorithm {}
///
/// impl<O, P, G, J, H, R, F> Solver<O, IterState<P, G, J, H, R, F>> for OptimizationAlgorithm
Expand Down
4 changes: 0 additions & 4 deletions crates/argmin/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,7 @@ use crate::solver::linesearch::{HagerZhangLineSearch, MoreThuenteLineSearch};
use crate::solver::newton::NewtonCG;
use crate::solver::quasinewton::{BFGS, DFP, LBFGS};

#[cfg(feature = "serde1")]
use serde::{Deserialize, Serialize};

#[derive(Clone, Default, Debug)]
#[cfg_attr(feature = "serde1", derive(Serialize, Deserialize))]
struct MaxEntropy {
F: Array2<f64>,
K: Array1<f64>,
Expand Down
2 changes: 1 addition & 1 deletion python/argmin-testfunctions-py/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ __pycache__/
# Distribution / packaging
.Python
.venv/
.evn/
.env/
env/
bin/
build/
Expand Down

0 comments on commit dfa22bb

Please sign in to comment.