This commit is contained in:
2026-06-07 01:29:58 -05:00
parent a8d2cb8303
commit ac7fd36ccd
3 changed files with 4 additions and 5 deletions
+3 -3
View File
@@ -583,9 +583,9 @@ impl From<&Board> for MapFile {
for x in 0..board.width {
let (glyph, arch) = board.get(x, y);
let key = (*glyph, *arch);
if !cell_to_key.contains_key(&key) {
if let std::collections::hash_map::Entry::Vacant(e) = cell_to_key.entry(key) {
if key == canonical_empty {
cell_to_key.insert(key, ' ');
e.insert(' ');
palette.insert(
" ".to_string(),
PaletteEntry {
@@ -599,7 +599,7 @@ impl From<&Board> for MapFile {
let ch = *pool_iter
.next()
.expect("board has more than 92 unique non-canonical cell types");
cell_to_key.insert(key, ch);
e.insert(ch);
palette.insert(
ch.to_string(),
PaletteEntry {