Skip to content

Commit

Permalink
Update assets_manager to 0.11
Browse files Browse the repository at this point in the history
  • Loading branch information
a1phyr committed Dec 30, 2023
1 parent d1912c0 commit 7b3c37a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ ahash = ["assets_manager/ahash"]
hot-reloading = ["assets_manager/hot-reloading"]

[dependencies]
assets_manager = { version = "0.10", default-features = false, features = ["utils", "parking_lot", "zip", "image"] }
assets_manager = { version = "0.11", default-features = false, features = ["utils", "parking_lot", "zip", "image"] }
ggez = { version = "0.9.0", default-features = false, features = ["audio"] }

directories = "5.0"
Expand Down
2 changes: 1 addition & 1 deletion src/assets.rs
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ trait NewWithGgezContext: Clone + Send + Sync + 'static {
fn create(context: &mut ggez::Context, asset: &Self::Asset) -> ggez::GameResult<Self>;

fn load_with_handle(
asset_handle: assets_manager::Handle<GgezAssetRepr<Self>>,
asset_handle: &assets_manager::Handle<GgezAssetRepr<Self>>,
context: &mut ggez::Context,
) -> ggez::GameResult<Self> {
let asset = asset_handle
Expand Down
7 changes: 4 additions & 3 deletions src/source.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use std::{io, sync::Arc};

use assets_manager::{
hot_reloading::{DynUpdateSender, EventSender, FsWatcherBuilder},
hot_reloading::{EventSender, FsWatcherBuilder},
source::{self, DirEntry, FileContent, Source},
};

Expand Down Expand Up @@ -157,7 +157,7 @@ impl Source for GgezFileSystem {
fn configure_hot_reloading(
&self,
events: EventSender,
) -> Result<DynUpdateSender, assets_manager::BoxedError> {
) -> Result<(), assets_manager::BoxedError> {
let mut watcher = FsWatcherBuilder::new()?;
if let Some(res) = &self.resources {
watcher.watch(res.root().to_owned())?;
Expand All @@ -168,6 +168,7 @@ impl Source for GgezFileSystem {
if let Some(res) = &self.config {
watcher.watch(res.root().to_owned())?;
}
Ok(watcher.build(events))
watcher.build(events);
Ok(())
}
}

0 comments on commit 7b3c37a

Please sign in to comment.