summaryrefslogtreecommitdiff
path: root/ecs/src/uid.rs
diff options
context:
space:
mode:
Diffstat (limited to 'ecs/src/uid.rs')
-rw-r--r--ecs/src/uid.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/ecs/src/uid.rs b/ecs/src/uid.rs
index 56d84f9..0e5d88a 100644
--- a/ecs/src/uid.rs
+++ b/ecs/src/uid.rs
@@ -29,10 +29,11 @@ impl Uid
let id_part = NEXT.fetch_add(1, Ordering::Relaxed);
Self {
- inner: ((id_part as u64) << 32) | kind as u64,
+ inner: (u64::from(id_part) << 32) | kind as u64,
}
}
+ #[must_use]
pub fn kind(&self) -> Kind
{
// SAFETY: The kind bits cannot be invalid since they are set using the Kind enum