tirbofish/dropbear · diff
material and model API (such as comparison and swapping)
jarvis, run github actions
Signature present but could not be verified.
Unverified
@@ -108,7 +108,7 @@ kotlin { sourceSets { commonMain { dependencies { - implementation("org.jetbrains.kotlinx:kotlinx-datetime:0.6.0") + api("org.jetbrains.kotlinx:kotlinx-datetime:0.6.0") } } nativeMain { @@ -1,4 +1,7 @@ -use std::sync::{Arc, atomic::{AtomicU64, Ordering}, LazyLock}; +use std::sync::{ + Arc, LazyLock, + atomic::{AtomicU64, Ordering}, +}; use dashmap::DashMap; @@ -15,7 +18,9 @@ impl AssetHandle { /// /// This function does not guarantee if the raw value exists in the registry. /// You will have to check yourself. - pub fn new(raw: u64) -> Self { Self(raw) } + pub fn new(raw: impl Into<u64>) -> Self { + Self(raw.into()) + } /// Returns the raw/primitive [`u64`] value. pub fn raw(&self) -> u64 { self.0 @@ -88,10 +93,12 @@ impl AssetRegistry { } } + /// Adds a pointer to the asset registry. pub fn add_pointer(&self, pointer_kind: PointerKind, pointer: usize) { self.pointers.insert(pointer_kind, pointer); } + /// Attempts to fetch a pointer from the [`AssetRegistry`] by its given [`PointerKind`] pub fn get_pointer(&self, pointer_kind: PointerKind) -> Option<usize> { self.pointers.get(&pointer_kind).map(|entry| *entry.value()) }
Large diffs are not rendered by default. Showing the first 50 of 2516 lines. Show full diff