Fix: counter reset after each iteration

This commit is contained in:
eugen.betke 2020-10-22 23:38:15 +02:00
parent e7c7d950b9
commit f4c0f27aad
1 changed files with 1 additions and 1 deletions

View File

@ -100,7 +100,6 @@ fn run(dataset_fn: String, jobid: Jobid, similarities_fn: String, progress_fn: S
let progress_file = File::create(&progress_fn).expect("Unable to open"); let progress_file = File::create(&progress_fn).expect("Unable to open");
let mut wtr_progress = csv::Writer::from_writer(&progress_file); let mut wtr_progress = csv::Writer::from_writer(&progress_file);
let mut counter = 1;
let mut similarities: Vec<(Jobid, Similarity, bool)> = Vec::new(); let mut similarities: Vec<(Jobid, Similarity, bool)> = Vec::new();
@ -108,6 +107,7 @@ fn run(dataset_fn: String, jobid: Jobid, similarities_fn: String, progress_fn: S
let mut log_file = LineWriter::new(log_file); let mut log_file = LineWriter::new(log_file);
for i in 0..10 { for i in 0..10 {
let mut counter = 1;
let mut avail_codings: Vec<(u32, &JobCoding)>; let mut avail_codings: Vec<(u32, &JobCoding)>;
avail_codings = q_codings.iter().map(|(k, v)| (*k, v)).collect(); avail_codings = q_codings.iter().map(|(k, v)| (*k, v)).collect();