Fix logic in delete_lines_from_record

This commit is contained in:
Kevin Liu 2016-10-21 02:25:20 -07:00
parent 0e373be6de
commit def845368b

View file

@ -375,8 +375,8 @@ fn delete_line_from_record<R>(record: R, graves_to_exhume: Vec<String>)
Ok(f) => BufReader::new(f) Ok(f) => BufReader::new(f)
.lines() .lines()
.filter_map(|l| l.ok()) .filter_map(|l| l.ok())
.filter(|l| graves_to_exhume.clone().into_iter() .filter(|l| !graves_to_exhume.clone().into_iter()
.any(|y| y != record_line(l.as_str()).dest)) .any(|y| y == record_line(l.as_str()).dest))
.collect(), .collect(),
Err(e) => return Err(e) Err(e) => return Err(e)
} }