mirror of
https://github.com/neocturne/MinedMap.git
synced 2025-07-06 23:59:07 +02:00
io/region: allow stopping foreach_chunk early
Errors returned from the callback stop the loop early.
This commit is contained in:
parent
551056803d
commit
b2d849081d
3 changed files with 6 additions and 4 deletions
|
@ -41,14 +41,15 @@ impl RegionProcessor {
|
|||
Ok(chunk) => chunk,
|
||||
Err(err) => {
|
||||
eprintln!("Chunk {:?}: {}", coords, err);
|
||||
return;
|
||||
return Ok(());
|
||||
}
|
||||
};
|
||||
|
||||
match world::layer::top_layer(&chunk, &self.block_types) {
|
||||
Ok(_) => {}
|
||||
Err(err) => println!("{:?}", err),
|
||||
}
|
||||
};
|
||||
Ok(())
|
||||
})
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue