xx 2.6.1

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(target_family = "wasm"))]
pub(crate) fn home_dir() -> Option<PathBuf> {
    homedir::my_home().ok().flatten()
}

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