Skip to content

Commit 46c62f7

Browse files
authored
bugfix
1 parent dbe6765 commit 46c62f7

File tree

1 file changed

+2
-2
lines changed
  • enclave/safetrace/enclave/src

1 file changed

+2
-2
lines changed

enclave/safetrace/enclave/src/data.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -251,8 +251,8 @@ pub fn find_match_internal(
251251
// https://stackoverflow.com/questions/5031268/algorithm-to-find-all-latitude-longitude-locations-within-a-certain-distance-fro
252252

253253
if (e.lat - d.lat).abs() * 111000.0 < DISTANCE * 0.71 {
254-
let r = Rng::new(gsl_rng_taus);
255-
let lapnoise = rgsl::randist::laplace::laplace(r, 0.87).abs()*2.0;
254+
let mut r = Rng::new(gsl_rng_taus);
255+
let lapnoise = rgsl::randist::laplace::laplace(&mut r, 0.87).abs()*2.0;
256256
// then we can run a more computationally expensive and precise comparison
257257
if (e.lat.sin()*d.lat.sin()+e.lat.cos()*d.lat.cos()*(e.lng-d.lng).cos()).acos() * EARTH_RADIUS - lapnoise < DISTANCE {
258258
results.push(d.clone());

0 commit comments

Comments
 (0)