Perform consistency check when reexporting

This commit is contained in:
Joscha 2022-10-03 18:11:37 +02:00
parent e74eee89e6
commit d910047b48
3 changed files with 13 additions and 6 deletions

View file

@ -9,6 +9,9 @@ pub fn reexport(from: &Path, to: &Path) -> io::Result<()> {
let from = BufReader::new(File::open(from)?);
let data = AdjacencyList::read(from)?;
eprintln!(">> Consistency check");
data.check_consistency();
eprintln!(">> Export");
let to = BufWriter::new(File::create(to)?);
data.write(to)?;