Skip to content

Commit

Permalink
Fix minor issues with custom_asset example (bevyengine#10337)
Browse files Browse the repository at this point in the history
# Objective

- Use bevy's re-exported `AsyncReadExt` so users don't think they need
to depend on `futures-lite`.
- Fix a funky  error text
  • Loading branch information
rparrett authored and Ray Redondo committed Jan 9, 2024
1 parent f0c93c7 commit 0b269ef
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions examples/asset/custom_asset.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -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}")]
Expand Down

0 comments on commit 0b269ef

Please sign in to comment.