local asset wasm fix

This commit is contained in:
rewin
2024-04-04 20:15:19 +03:00
parent e7d5464cb9
commit fe4ae8398d
+3 -3
View File
@@ -85,10 +85,10 @@ impl RemoteAssetReader {
let token = path
.ext_file_prefix()
.ok_or_else(|| {
AssetReaderError::Io(std::io::Error::new(
AssetReaderError::Io(Arc::new(std::io::Error::new(
ErrorKind::Other,
format!("Failed to parse token from '{path:?}'"),
))
)))
})?
.to_str()
.unwrap();
@@ -97,7 +97,7 @@ impl RemoteAssetReader {
info!("Sent request to bevy");
let bytes = bytes
.await
.map_err(|e| std::io::Error::new(ErrorKind::Other, format!("{e:?}")))?;
.map_err(|e| AssetReaderError::Io(Arc::new(std::io::Error::new(ErrorKind::Other, format!("{e:?}")))))?;
let reader: Box<Reader> = Box::new(VecReader::new(bytes));
Ok(reader)