From 8f16b3b5364eeef44e3fbbf0489b774504a2f5f0 Mon Sep 17 00:00:00 2001 From: Utkarsh Gupta Date: Sun, 23 Apr 2023 16:48:15 +0530 Subject: [PATCH] Move to the smaller, cargo-team maintained `home` crate --- Cargo.toml | 5 ++--- src/completion.rs | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index f4459d353..57a51d1ad 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -26,8 +26,7 @@ members = ["rustyline-derive"] bitflags = "2.0" cfg-if = "1.0" # For file completion -# https://rustsec.org/advisories/RUSTSEC-2020-0053.html -dirs-next = { version = "2.0", optional = true } +home = { version = "0.5.4", optional = true } # For History fd-lock = { version = "3.0.0", optional = true } rusqlite = { version = "0.29.0", optional = true, default-features = false, features = ["bundled", "backup"] } @@ -64,7 +63,7 @@ assert_matches = "1.2" default = ["custom-bindings", "with-dirs", "with-file-history"] custom-bindings = ["radix_trie"] derive = ["rustyline-derive"] -with-dirs = ["dirs-next"] +with-dirs = ["home"] with-file-history = ["fd-lock"] with-sqlite-history = ["rusqlite"] with-fuzzy = ["skim"] diff --git a/src/completion.rs b/src/completion.rs index b0d3c348f..e369a3377 100644 --- a/src/completion.rs +++ b/src/completion.rs @@ -327,7 +327,7 @@ fn filename_complete( quote: Quote, ) -> Vec { #[cfg(feature = "with-dirs")] - use dirs_next::home_dir; + use home::home_dir; use std::env::current_dir; let sep = path::MAIN_SEPARATOR;