From 270e9eeed3a6c80ade32676b7ef2ec0b430e9d79 Mon Sep 17 00:00:00 2001 From: vrbouza <15350389+vrbouza@users.noreply.github.com> Date: Mon, 4 Nov 2024 17:05:50 +0000 Subject: [PATCH] Improved neatness of code. --- src/lib.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index cc6af43..9c279e9 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -223,7 +223,7 @@ pub fn main() -> Result<(), Error> { references.get_sketch_slice(j, k), references.sketch_size, ); - dist = if *ani { ani_pois(dist, k_f32) } else { 1 as f32 - dist }; + dist = if *ani { ani_pois(dist, k_f32) } else { 1.0_f32 - dist }; dist_slice[dist_idx] = dist; } else { let dist = @@ -275,7 +275,7 @@ pub fn main() -> Result<(), Error> { references.sketch_size, ); dist = - if *ani { ani_pois(dist, k_f32) } else { 1 as f32 - dist }; + if *ani { ani_pois(dist, k_f32) } else { 1.0_f32 - dist }; let dist_item = SparseJaccard(j, dist); if heap.len() < nn || dist_item < *heap.peek().unwrap() @@ -350,7 +350,7 @@ pub fn main() -> Result<(), Error> { query_db.get_sketch_slice(j, k), references.sketch_size, ); - dist = if *ani { ani_pois(dist, k_f32) } else { 1 as f32 - dist }; + dist = if *ani { ani_pois(dist, k_f32) } else { 1.0_f32 - dist }; dist_slice[dist_idx] = dist; } else { let dist = core_acc_dist(&references, &query_db, i, j);