From f775b6a376a25238dad43e298725a03c2b7101b9 Mon Sep 17 00:00:00 2001 From: Imbris Date: Fri, 19 Jun 2020 01:31:15 -0400 Subject: [PATCH] Fix cargo test failing --- voxygen/src/anim/Cargo.toml | 4 +++- voxygen/src/anim/src/dyn_lib.rs | 6 +++--- voxygen/src/anim/src/lib.rs | 2 +- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/voxygen/src/anim/Cargo.toml b/voxygen/src/anim/Cargo.toml index c2b2b72633..0a2434cd64 100644 --- a/voxygen/src/anim/Cargo.toml +++ b/voxygen/src/anim/Cargo.toml @@ -6,7 +6,9 @@ edition = "2018" [lib] name = "voxygen_anim" -crate-type = ["lib", "cdylib"] +# Uncomment to use animation hot reloading +# Note: this breaks `cargo test` +#crate-type = ["lib", "cdylib"] [features] use-dyn-lib = ["libloading", "notify", "lazy_static", "log"] diff --git a/voxygen/src/anim/src/dyn_lib.rs b/voxygen/src/anim/src/dyn_lib.rs index 6474819212..9308c97e30 100644 --- a/voxygen/src/anim/src/dyn_lib.rs +++ b/voxygen/src/anim/src/dyn_lib.rs @@ -57,7 +57,7 @@ pub fn init() { while let Ok(path) = reload_recv.recv() { modified_paths.insert(path); - // Wait for to see if there are more modify events before reloading + // Wait for any additional modify events before reloading while let Ok(path) = reload_recv.recv_timeout(Duration::from_millis(300)) { modified_paths.insert(path); } @@ -80,7 +80,7 @@ pub fn init() { std::mem::forget(watcher); } -// Recompiles and hotreloads the lib if the source is changed +// Recompiles and hotreloads the lib if the source has been changed // Note: designed with voxygen dir as working dir, could be made more flexible fn event_fn(res: notify::Result, sender: &mpsc::Sender) { match res { @@ -96,7 +96,7 @@ fn event_fn(res: notify::Result, sender: &mpsc::Sender) { }, _ => {}, }, - Err(e) => log::error!("Animation hotreload watch error: {:?}", e), + Err(e) => log::error!("Animation hotreload watcher error: {:?}", e), } } diff --git a/voxygen/src/anim/src/lib.rs b/voxygen/src/anim/src/lib.rs index 44942a0aa2..766775c36d 100644 --- a/voxygen/src/anim/src/lib.rs +++ b/voxygen/src/anim/src/lib.rs @@ -122,7 +122,7 @@ pub trait Animation { ) -> Self::Skeleton; /// Calls `update_skeleton_inner` either directly or via `libloading` to - /// produce generate the new skeleton. + /// generate the new skeleton. fn update_skeleton( skeleton: &Self::Skeleton, dependency: Self::Dependency,