diff options
| author | Freya Murphy <freya@freyacat.org> | 2025-11-10 15:05:45 -0500 |
|---|---|---|
| committer | Freya Murphy <freya@freyacat.org> | 2025-11-10 15:05:45 -0500 |
| commit | caefd6a78323379cdd39339a4e792a19f0a494f0 (patch) | |
| tree | 441984c300b1dd81ff40365386b20b5a3dec8bf7 /dungeon/src | |
| parent | dungeon: new_unchecked should be unsafe (diff) | |
| download | DungeonCrawl-caefd6a78323379cdd39339a4e792a19f0a494f0.tar.gz DungeonCrawl-caefd6a78323379cdd39339a4e792a19f0a494f0.tar.bz2 DungeonCrawl-caefd6a78323379cdd39339a4e792a19f0a494f0.zip | |
graphics: decouple sdl & wayland
Diffstat (limited to 'dungeon/src')
| -rw-r--r-- | dungeon/src/pos.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/dungeon/src/pos.rs b/dungeon/src/pos.rs index 8d84d3f..e3365ef 100644 --- a/dungeon/src/pos.rs +++ b/dungeon/src/pos.rs @@ -135,12 +135,12 @@ impl Pos { /// let pos = unsafe { Pos::new_unchecked(1, 1) }; /// assert_eq!(pos.xy(), (1,1)); /// ``` - /// - /// # Safety - /// - /// Library code and crates that use it expect the `Pos` x and y positions - /// to be within a gurenteed bound. When they are not this can cause - /// undefined behaviour, or crashes. + /// + /// # Safety + /// + /// Library code and crates that use it expect the `Pos` x and y positions + /// to be within a gurenteed bound. When they are not this can cause + /// undefined behaviour, or crashes. #[must_use] pub const unsafe fn new_unchecked(x: u16, y: u16) -> Self { Self(x, y) |