mirror of
https://github.com/Xevion/Pac-Man.git
synced 2025-12-09 08:08:13 -06:00
refactor: use small_rng for Emscripten only, simplify platform to top-level functions only, no trait/struct
This commit is contained in:
@@ -44,7 +44,7 @@ impl Asset {
|
||||
mod imp {
|
||||
use super::*;
|
||||
use crate::error::AssetError;
|
||||
use crate::platform::get_platform;
|
||||
use crate::platform;
|
||||
|
||||
/// Loads asset bytes using the appropriate platform-specific method.
|
||||
///
|
||||
@@ -58,7 +58,7 @@ mod imp {
|
||||
/// Returns `AssetError::NotFound` if the asset file cannot be located (Emscripten only),
|
||||
/// or `AssetError::Io` for filesystem I/O failures.
|
||||
pub fn get_asset_bytes(asset: Asset) -> Result<Cow<'static, [u8]>, AssetError> {
|
||||
get_platform().get_asset_bytes(asset)
|
||||
platform::get_asset_bytes(asset)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user