xx 2.6.0

A collection of useful Rust macros and small functions.
Documentation
1
2
3
4
5
6
7
8
9
10
11
use std::path::PathBuf;

#[cfg(not(all(target_family = "wasm", target_os = "unknown")))]
pub(crate) fn home_dir() -> Option<PathBuf> {
    homedir::my_home().ok().flatten()
}

#[cfg(all(target_family = "wasm", target_os = "unknown"))]
pub(crate) fn home_dir() -> Option<PathBuf> {
    None
}