Skip to content

Commit 1e0dad2

Browse files
authored
Add to_u16() accessor to TextEntry (#203)
1 parent 892b1d6 commit 1e0dad2

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/video/mod.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -323,6 +323,13 @@ impl TextEntry {
323323
pub const fn from_tile(id: u16) -> Self {
324324
Self(id & 0b11_1111_1111)
325325
}
326+
327+
/// Unwrap this value into its raw `u16` form.
328+
#[inline]
329+
#[must_use]
330+
pub const fn to_u16(self) -> u16 {
331+
self.0
332+
}
326333
}
327334

328335
#[inline]

0 commit comments

Comments
 (0)