clippy
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user