fix: Use dirs crate for home_dir() function

This commit is contained in:
Michael Aaron Murphy 2022-03-27 16:05:04 +02:00 committed by Michael Murphy
parent e578f2d19c
commit b770b59e7b
8 changed files with 10 additions and 6 deletions

View file

@ -28,7 +28,7 @@ pub fn plugin_paths() -> impl Iterator<Item = Cow<'static, Path>> {
PLUGIN_PATHS.iter().map(|path| {
#[allow(deprecated)]
if let Some(path) = path.strip_prefix("~/") {
let path = std::env::home_dir()
let path = dirs::home_dir()
.expect("user does not have home dir")
.join(path);
Cow::Owned(path)