diff options
| author | Freya Murphy <freya@freyacat.org> | 2025-11-10 22:10:52 -0500 |
|---|---|---|
| committer | Freya Murphy <freya@freyacat.org> | 2025-11-10 22:11:42 -0500 |
| commit | 3efd5859f53817a0df1eeb7e9317cdc85b62bb61 (patch) | |
| tree | 0bc79cff70f2b7a71f56ac5b35ace2c542c3b398 /dungeon/src/map.rs | |
| parent | add more to checkpoint doc (diff) | |
| download | DungeonCrawl-3efd5859f53817a0df1eeb7e9317cdc85b62bb61.tar.gz DungeonCrawl-3efd5859f53817a0df1eeb7e9317cdc85b62bb61.tar.bz2 DungeonCrawl-3efd5859f53817a0df1eeb7e9317cdc85b62bb61.zip | |
use fmt fns directly when possible
Diffstat (limited to 'dungeon/src/map.rs')
| -rw-r--r-- | dungeon/src/map.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/dungeon/src/map.rs b/dungeon/src/map.rs index 19c1de8..4e1f235 100644 --- a/dungeon/src/map.rs +++ b/dungeon/src/map.rs @@ -1,7 +1,7 @@ //! The `map` module contains structures of the dungeon game map //! including the current `Floor`, and map `Tile`. -use rand::{rngs::StdRng, Rng, SeedableRng, TryRngCore}; +use rand::{Rng, SeedableRng, TryRngCore, rngs::StdRng}; use strum::IntoEnumIterator; use strum_macros::EnumIter; @@ -265,10 +265,10 @@ impl Display for Floor { } // Otherwise, show the tile character let tile = self.get(pos); - write!(f, "{tile}")?; + tile.fmt(f)?; // Newline at the end of each row if pos.xy().0 == MAP_SIZE - 1 { - writeln!(f)?; + f.write_char('\n')?; } } |