scsys-util 0.3.2

scsys is a collection of primitives and utilities for use throughout the ecosystem.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
/*
    Appellation: project <module>
    Contrib: @FL03
*/
/// Fetch the project root unless specified otherwise with a CARGO_MANIFEST_DIR env variable
#[cfg(feature = "std")]
pub fn project_root() -> std::path::PathBuf {
    std::path::Path::new(&env!("CARGO_MANIFEST_DIR"))
        .ancestors()
        .nth(1)
        .unwrap()
        .to_path_buf()
}