mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Removed redundant package parameter from init function of hot reloading
This commit is contained in:
parent
cfeb197f85
commit
3d6c9a780d
@ -121,10 +121,9 @@ impl LoadedLib {
|
|||||||
/// files within it for any changes.
|
/// files within it for any changes.
|
||||||
pub fn init(
|
pub fn init(
|
||||||
package: &'static str,
|
package: &'static str,
|
||||||
dyn_package: &'static str,
|
|
||||||
package_source_dir: &'static str,
|
package_source_dir: &'static str,
|
||||||
) -> Arc<Mutex<Option<LoadedLib>>> {
|
) -> Arc<Mutex<Option<LoadedLib>>> {
|
||||||
let lib_storage = Arc::new(Mutex::new(Some(LoadedLib::compile_load(dyn_package))));
|
let lib_storage = Arc::new(Mutex::new(Some(LoadedLib::compile_load(package))));
|
||||||
|
|
||||||
// TODO: use crossbeam
|
// TODO: use crossbeam
|
||||||
let (reload_send, reload_recv) = mpsc::channel();
|
let (reload_send, reload_recv) = mpsc::channel();
|
||||||
@ -164,7 +163,7 @@ pub fn init(
|
|||||||
"Hot reloading {} because files in `{}` modified.", package, package_source_dir
|
"Hot reloading {} because files in `{}` modified.", package, package_source_dir
|
||||||
);
|
);
|
||||||
|
|
||||||
hotreload(dyn_package, &lib_storage_clone);
|
hotreload(package, &lib_storage_clone);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.unwrap();
|
.unwrap();
|
||||||
|
@ -17,7 +17,7 @@ use {common_dynlib::LoadedLib, lazy_static::lazy_static, std::sync::Arc, std::sy
|
|||||||
#[cfg(feature = "use-dyn-lib")]
|
#[cfg(feature = "use-dyn-lib")]
|
||||||
lazy_static! {
|
lazy_static! {
|
||||||
pub static ref LIB: Arc<Mutex<Option<LoadedLib>>> =
|
pub static ref LIB: Arc<Mutex<Option<LoadedLib>>> =
|
||||||
common_dynlib::init("veloren-server-agent", "veloren-server-agent", "agent");
|
common_dynlib::init("veloren-server-agent", "agent");
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(feature = "use-dyn-lib")]
|
#[cfg(feature = "use-dyn-lib")]
|
||||||
|
@ -99,7 +99,7 @@ pub type Bone = Transform<f32, f32, f32>;
|
|||||||
#[cfg(feature = "use-dyn-lib")]
|
#[cfg(feature = "use-dyn-lib")]
|
||||||
lazy_static! {
|
lazy_static! {
|
||||||
static ref LIB: Arc<Mutex<Option<LoadedLib>>> =
|
static ref LIB: Arc<Mutex<Option<LoadedLib>>> =
|
||||||
common_dynlib::init("veloren-voxygen-anim", "veloren-voxygen-anim", "anim");
|
common_dynlib::init("veloren-voxygen-anim", "anim");
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(feature = "use-dyn-lib")]
|
#[cfg(feature = "use-dyn-lib")]
|
||||||
|
@ -37,7 +37,7 @@ use {
|
|||||||
#[cfg(feature = "use-dyn-lib")]
|
#[cfg(feature = "use-dyn-lib")]
|
||||||
lazy_static! {
|
lazy_static! {
|
||||||
static ref LIB: Arc<Mutex<Option<LoadedLib>>> =
|
static ref LIB: Arc<Mutex<Option<LoadedLib>>> =
|
||||||
common_dynlib::init("veloren-voxygen-egui", "veloren-voxygen-egui", "egui");
|
common_dynlib::init("veloren-voxygen-egui", "egui");
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(feature = "use-dyn-lib")]
|
#[cfg(feature = "use-dyn-lib")]
|
||||||
|
Loading…
Reference in New Issue
Block a user