From 4f2597e666bddd3c12d15ac4db532b48b4b449cc Mon Sep 17 00:00:00 2001 From: Phil Ellison Date: Sun, 10 Mar 2024 14:22:26 +0000 Subject: [PATCH] Fix build --- src/binary_descriptors/brief.rs | 8 ++++---- src/binary_descriptors/mod.rs | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/binary_descriptors/brief.rs b/src/binary_descriptors/brief.rs index 90f20b96..85c3bf61 100644 --- a/src/binary_descriptors/brief.rs +++ b/src/binary_descriptors/brief.rs @@ -338,8 +338,8 @@ mod tests { .into_iter() .map(|_| { Point::new( - rng.gen_range(24, image.width() - 24), - rng.gen_range(24, image.height() - 24), + rng.gen_range(24..image.width() - 24), + rng.gen_range(24..image.height() - 24), ) }) .collect::>>(); @@ -357,8 +357,8 @@ mod tests { .into_iter() .map(|_| { Point::new( - rng.gen_range(24, image.width() - 24), - rng.gen_range(24, image.height() - 24), + rng.gen_range(24..image.width() - 24), + rng.gen_range(24..image.height() - 24), ) }) .collect::>>(); diff --git a/src/binary_descriptors/mod.rs b/src/binary_descriptors/mod.rs index 158fc113..9b8035e7 100644 --- a/src/binary_descriptors/mod.rs +++ b/src/binary_descriptors/mod.rs @@ -79,7 +79,7 @@ pub fn match_binary_descriptors<'a, T: BinaryDescriptor>( for _ in 0..l { // choose k random bits (not necessarily unique) let bits = (0..k) - .map(|_| rng.gen_range(0, queries[0].get_size())) + .map(|_| rng.gen_range(0..queries[0].get_size())) .collect::>(); let mut new_hashmap = HashMap::>::with_capacity(database.len()); @@ -148,8 +148,8 @@ mod tests { .into_iter() .map(|_| { Point::new( - rng.gen_range(20, image.width() - 20), - rng.gen_range(20, image.height() - 20), + rng.gen_range(20..image.width() - 20), + rng.gen_range(20..image.height() - 20), ) }) .collect::>>();