From fe25fc6992ef0889197cd9ae1a37f21f99568a36 Mon Sep 17 00:00:00 2001 From: Rob Parrett Date: Mon, 13 Nov 2023 18:21:02 -0700 Subject: [PATCH] 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 --- examples/asset/custom_asset.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/examples/asset/custom_asset.rs b/examples/asset/custom_asset.rs index c0aa0ad9b83b9..7b3ec854a637c 100644 --- a/examples/asset/custom_asset.rs +++ b/examples/asset/custom_asset.rs @@ -2,12 +2,11 @@ use bevy::utils::thiserror; use bevy::{ - asset::{io::Reader, AssetLoader, LoadContext}, + asset::{io::Reader, AssetLoader, AsyncReadExt, LoadContext}, prelude::*, reflect::TypePath, utils::BoxedFuture, }; -use futures_lite::AsyncReadExt; use serde::Deserialize; use thiserror::Error; @@ -24,7 +23,7 @@ pub struct CustomAssetLoader; #[derive(Debug, Error)] pub enum CustomAssetLoaderError { /// An [IO](std::io) Error - #[error("Could load shader: {0}")] + #[error("Could not load asset: {0}")] Io(#[from] std::io::Error), /// A [RON](ron) Error #[error("Could not parse RON: {0}")]