mirror of
https://github.com/neocturne/MinedMap.git
synced 2025-07-03 06:09:07 +02:00
minedmap: store region list in BTreeSet
We want to have a sorted list in the end anyways to make metadata generation deterministic, and we don't have to worry about deduplication of coordinates when generating mipmap tile lists.
This commit is contained in:
parent
e5c96ecb99
commit
b53d34da3d
3 changed files with 7 additions and 7 deletions
|
@ -80,10 +80,10 @@ impl<'a> TileRenderer<'a> {
|
|||
})
|
||||
}
|
||||
|
||||
pub fn run(self, regions: &[TileCoords]) -> Result<()> {
|
||||
pub fn run(self, regions: impl IntoIterator<Item = TileCoords>) -> Result<()> {
|
||||
fs::create_dir_all(&self.config.map_dir)?;
|
||||
|
||||
for &coords in regions {
|
||||
for coords in regions {
|
||||
if let Err(err) = self.render_tile(coords) {
|
||||
eprintln!("Failed to render tile {:?}: {:?}", coords, err,);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue