Skip to content

Commit

Permalink
Fix clippy results
Browse files Browse the repository at this point in the history
  • Loading branch information
bjorn3 committed Apr 9, 2021
1 parent a3602a9 commit a6217c2
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions crates/bevy_asset/src/asset_server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -217,12 +217,11 @@ impl AssetServer {
}

// TODO: properly set failed LoadState in all failure cases
async fn load_async<'a>(
async fn load_async(
&self,
path: AssetPath<'a>,
asset_path: AssetPath<'_>,
force: bool,
) -> Result<AssetPathId, AssetServerError> {
let asset_path: AssetPath = path.into();
let asset_loader = self.get_path_asset_loader(asset_path.path())?;
let asset_path_id: AssetPathId = asset_path.get_id();

Expand Down Expand Up @@ -332,11 +331,10 @@ impl AssetServer {

pub(crate) fn load_untracked<'a>(&self, asset_path: AssetPath<'a>, force: bool) -> HandleId {
let server = self.clone();
let owned_path = asset_path.to_owned();
self.server
.task_pool
.spawn(async move {
if let Err(err) = server.load_async(owned_path.into(), force).await {
if let Err(err) = server.load_async(asset_path.into(), force).await {
warn!("{}", err);
}
})
Expand Down

0 comments on commit a6217c2

Please sign in to comment.