Update crates/bevy_asset/src/io/wasm.rs

Co-authored-by: atlv <email@atlasdostal.com>
This commit is contained in:
Pete Hayman 2025-07-09 14:34:24 +10:00 committed by GitHub
parent 1c93df0622
commit 4e34cdf2f3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -52,7 +52,7 @@ fn js_value_to_err(context: &str) -> impl FnOnce(JsValue) -> std::io::Error + '_
}
impl HttpWasmAssetReader {
// Also used by HttpSourceAssetReader
// Also used by [`HttpSourceAssetReader`](crate::HttpSourceAssetReader)
pub(crate) async fn fetch_bytes(&self, path: PathBuf) -> Result<impl Reader, AssetReaderError> {
// The JS global scope includes a self-reference via a specializing name, which can be used to determine the type of global context available.
let global: Global = js_sys::global().unchecked_into();