summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFreya Murphy <freya@freyacat.org>2025-11-13 11:08:28 -0500
committerFreya Murphy <freya@freyacat.org>2025-11-13 11:08:28 -0500
commit340515176f9421cbf60e5dbb3d3832f4f78b3e58 (patch)
treeee07ad3cdd5321dea0f16e9b8cc9c8307cf345f0
parentgame: add option to pass in the game seed (diff)
downloadDungeonCrawl-340515176f9421cbf60e5dbb3d3832f4f78b3e58.tar.gz
DungeonCrawl-340515176f9421cbf60e5dbb3d3832f4f78b3e58.tar.bz2
DungeonCrawl-340515176f9421cbf60e5dbb3d3832f4f78b3e58.zip
dungeon: refactor manual drop
-rw-r--r--dungeon/src/map.rs4
1 files changed, 1 insertions, 3 deletions
diff --git a/dungeon/src/map.rs b/dungeon/src/map.rs
index ed92882..a28248b 100644
--- a/dungeon/src/map.rs
+++ b/dungeon/src/map.rs
@@ -138,11 +138,9 @@ impl Floor {
#[must_use]
pub fn hash(&self) -> u64 {
// initial (immutable) dirty check
- let dirty = self.dirty.borrow();
- if !*dirty {
+ if !*self.dirty.borrow() {
return *self.hash.borrow();
}
- drop(dirty);
// recompute hash
let mut dirty = self.dirty.borrow_mut();