Skip to content

Commit fe25fc6

Browse files
authored
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
1 parent 18d001d commit fe25fc6

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

examples/asset/custom_asset.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,11 @@
22
33
use bevy::utils::thiserror;
44
use bevy::{
5-
asset::{io::Reader, AssetLoader, LoadContext},
5+
asset::{io::Reader, AssetLoader, AsyncReadExt, LoadContext},
66
prelude::*,
77
reflect::TypePath,
88
utils::BoxedFuture,
99
};
10-
use futures_lite::AsyncReadExt;
1110
use serde::Deserialize;
1211
use thiserror::Error;
1312

@@ -24,7 +23,7 @@ pub struct CustomAssetLoader;
2423
#[derive(Debug, Error)]
2524
pub enum CustomAssetLoaderError {
2625
/// An [IO](std::io) Error
27-
#[error("Could load shader: {0}")]
26+
#[error("Could not load asset: {0}")]
2827
Io(#[from] std::io::Error),
2928
/// A [RON](ron) Error
3029
#[error("Could not parse RON: {0}")]

0 commit comments

Comments
 (0)