Fix minor issues with custom_asset example (#10337)
# Objective - Use bevy's re-exported `AsyncReadExt` so users don't think they need to depend on `futures-lite`. - Fix a funky error text
This commit is contained in:
parent
18d001d27c
commit
fe25fc6992
@ -2,12 +2,11 @@
|
|||||||
|
|
||||||
use bevy::utils::thiserror;
|
use bevy::utils::thiserror;
|
||||||
use bevy::{
|
use bevy::{
|
||||||
asset::{io::Reader, AssetLoader, LoadContext},
|
asset::{io::Reader, AssetLoader, AsyncReadExt, LoadContext},
|
||||||
prelude::*,
|
prelude::*,
|
||||||
reflect::TypePath,
|
reflect::TypePath,
|
||||||
utils::BoxedFuture,
|
utils::BoxedFuture,
|
||||||
};
|
};
|
||||||
use futures_lite::AsyncReadExt;
|
|
||||||
use serde::Deserialize;
|
use serde::Deserialize;
|
||||||
use thiserror::Error;
|
use thiserror::Error;
|
||||||
|
|
||||||
@ -24,7 +23,7 @@ pub struct CustomAssetLoader;
|
|||||||
#[derive(Debug, Error)]
|
#[derive(Debug, Error)]
|
||||||
pub enum CustomAssetLoaderError {
|
pub enum CustomAssetLoaderError {
|
||||||
/// An [IO](std::io) Error
|
/// An [IO](std::io) Error
|
||||||
#[error("Could load shader: {0}")]
|
#[error("Could not load asset: {0}")]
|
||||||
Io(#[from] std::io::Error),
|
Io(#[from] std::io::Error),
|
||||||
/// A [RON](ron) Error
|
/// A [RON](ron) Error
|
||||||
#[error("Could not parse RON: {0}")]
|
#[error("Could not parse RON: {0}")]
|
||||||
|
Loading…
Reference in New Issue
Block a user