diff options
| author | Alexander_Kabui <alexanderkabua@gmail.com> | 2025-03-04 15:14:21 +0300 |
|---|---|---|
| committer | Alexander_Kabui <alexanderkabua@gmail.com> | 2025-03-04 15:14:21 +0300 |
| commit | 1dec7b28b89f858cb7989938805d2dcefab4bc95 (patch) | |
| tree | 692a8905392348d51929a5740eed28b1a356d06b /src | |
| parent | 29293fc2937bb4e8de9c63548c5c4e0379466531 (diff) | |
| download | correlation_rust-1dec7b28b89f858cb7989938805d2dcefab4bc95.tar.gz | |
refactor: Replace redundant double-sorting with a single call to `custom_float_sorter`.
Diffstat (limited to 'src')
| -rw-r--r-- | src/correlations.rs | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/src/correlations.rs b/src/correlations.rs index 0437f8d..29b9064 100644 --- a/src/correlations.rs +++ b/src/correlations.rs @@ -176,12 +176,6 @@ impl<'a> Compute<'a> { Err(err) => panic!("an error ocurrexxxxxxxxxxxxxxd {:?}", err), } - //naive implementation try extern sorting could save 3 seconds - - corr_results.sort_by(|a, b| { - b.1.abs().partial_cmp(&a.1.abs()).unwrap_or_else(|| { - Ordering::Less})}); - sort_write_to_file(String::from(self.output_file), corr_results) } } |
