Fix hot asset reloading on Windows (#394)

Fixes #348

Changes to uses fully qualified names to work around
https://github.com/rust-analyzer/rust-analyzer/issues/1165
This commit is contained in:
Daniel McNab 2020-08-30 19:22:40 +01:00 committed by GitHub
parent ad460159b0
commit 61b5fe9cfc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -13,6 +13,7 @@ use std::{
sync::Arc,
thread,
};
use thiserror::Error;
/// The type used for asset versioning
@ -184,7 +185,6 @@ impl AssetServer {
#[cfg(feature = "filesystem_watcher")]
pub fn filesystem_watcher_system(asset_server: Res<AssetServer>) {
use notify::event::{Event, EventKind, ModifyKind};
let mut changed = HashSet::default();
loop {
@ -201,8 +201,8 @@ impl AssetServer {
Err(TryRecvError::Empty) => break,
Err(TryRecvError::Disconnected) => panic!("FilesystemWatcher disconnected"),
};
if let Event {
kind: EventKind::Modify(ModifyKind::Data(_)),
if let notify::event::Event {
kind: notify::event::EventKind::Modify(_),
paths,
..
} = event