implement PathSearcher
to facilitate module reloading
This commit is contained in:
6
src/utils.rs
Normal file
6
src/utils.rs
Normal file
@@ -0,0 +1,6 @@
|
||||
use std::path::PathBuf;
|
||||
|
||||
/// Return the value of `$CARGO_MANIFEST_DIR` at runtime.
|
||||
pub(crate) fn runtime_root() -> PathBuf {
|
||||
PathBuf::new().join(std::env::var("CARGO_MANIFEST_DIR").unwrap())
|
||||
}
|
Reference in New Issue
Block a user