diff --git a/Cargo.lock b/Cargo.lock index 2ec2eca5a..b29daaaa5 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -206,7 +206,6 @@ name = "ekore" version = "0.0.1" dependencies = [ "float-cmp", - "hashbrown", "num", ] diff --git a/crates/README.md b/crates/README.md index baa27a087..212e755cd 100644 --- a/crates/README.md +++ b/crates/README.md @@ -4,6 +4,7 @@ Here, we develop the Rust components of the EKO library ## Crates +- `dekoder` handles the output file - `ekore` contains the underlying collinear anomalous dimensions and the operator matrix elements - `eko` is the glue between the Python side and the `ekore` crate @@ -12,7 +13,7 @@ Here, we develop the Rust components of the EKO library - `release.json` defines the releasing order of crates - only listed crates will be released - dependent crates should follow those they are depending on -- `katex-header.html` is an HTML snippet to be included in every docs page to inject - KaTeX support +- `doc-header.html` is an HTML snippet to be included in every docs page to inject + KaTeX support and abbreviation support - `bump-versions.py` increases the Rust versions in all crates consistently - `make_bib.py` generates the Rust function stubs which serve as fake bibliography system diff --git a/crates/dekoder/src/eko.rs b/crates/dekoder/src/eko.rs index 1e950ac8a..1df9d7811 100644 --- a/crates/dekoder/src/eko.rs +++ b/crates/dekoder/src/eko.rs @@ -27,14 +27,11 @@ impl TryFrom<&Yaml> for EvolutionPoint { fn try_from(yml: &Yaml) -> Result { // work around float representation let scale = yml["scale"].as_f64(); - let scale = if scale.is_some() { - scale.ok_or(EKOError::KeyError( - "because failed to read scale as float".to_owned(), - ))? - } else { - yml["scale"].as_i64().ok_or(EKOError::KeyError( + let scale = match scale { + Some(scale) => scale, + None => yml["scale"].as_i64().ok_or(EKOError::KeyError( "because failed to read scale as float from int".to_owned(), - ))? as f64 + ))? as f64, }; let nf = yml["nf"] .as_i64() diff --git a/crates/ekore/Cargo.toml b/crates/ekore/Cargo.toml index 419bc126a..9d5acd2a9 100644 --- a/crates/ekore/Cargo.toml +++ b/crates/ekore/Cargo.toml @@ -19,5 +19,6 @@ rustdoc-args = ["--html-in-header", "doc-header.html"] [dependencies] num = "0.4.1" + +[dev-dependencies] float-cmp = "0.9.0" -hashbrown = "0.14" diff --git a/crates/ekore/src/harmonics/cache.rs b/crates/ekore/src/harmonics/cache.rs index 1342f5175..eb2a9090b 100644 --- a/crates/ekore/src/harmonics/cache.rs +++ b/crates/ekore/src/harmonics/cache.rs @@ -1,7 +1,7 @@ //! Cache harmonic sums for given Mellin N. -use hashbrown::HashMap; use num::{complex::Complex, Zero}; +use std::collections::HashMap; use crate::harmonics::{g_functions, w1, w2, w3, w4}; diff --git a/crates/ekore/src/util.rs b/crates/ekore/src/util.rs index 9d8b457e8..8d98f25b0 100644 --- a/crates/ekore/src/util.rs +++ b/crates/ekore/src/util.rs @@ -9,6 +9,7 @@ macro_rules! cmplx { } /// Shorthand complex number comparators. +#[cfg(test)] #[macro_export] macro_rules! assert_approx_eq_cmplx { ($size:ty, $ref:expr, $target:expr) => { diff --git a/crates/release.json b/crates/release.json index c2b9f6f54..71e4a8ef0 100644 --- a/crates/release.json +++ b/crates/release.json @@ -1 +1 @@ -["ekore", "eko"] +["dekoder", "ekore", "eko"]