From 7eb456953089f23229599e46a04a060d2c1ed662 Mon Sep 17 00:00:00 2001 From: Utkarsh Gupta Date: Wed, 26 Apr 2023 02:22:14 +0530 Subject: [PATCH] Move to the smaller, cargo-team maintained `home` crate (#113) --- Cargo.toml | 2 +- src/terminfo/searcher.rs | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 2202cd8..04656a3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -20,7 +20,7 @@ circle-ci = { repository = "Stebalien/term" } appveyor = { repository = "Stebalien/term" } [dependencies] -dirs-next = "2" +home = "0.5.4" [target.'cfg(windows)'.dependencies] winapi = { version = "0.3", features = ["consoleapi", "wincon", "handleapi", "fileapi"] } diff --git a/src/terminfo/searcher.rs b/src/terminfo/searcher.rs index fca3061..1763d2c 100644 --- a/src/terminfo/searcher.rs +++ b/src/terminfo/searcher.rs @@ -16,8 +16,6 @@ use std::env; use std::fs; use std::path::PathBuf; -use dirs_next as dirs; - /// Return path to database entry for `term` pub fn get_dbpath_for_term(term: &str) -> Option { let mut dirs_to_search = Vec::new(); @@ -58,7 +56,7 @@ pub fn get_dbpath_for_term(term: &str) -> Option { // ~/.terminfo, ncurses will search /etc/terminfo, then // /lib/terminfo, and eventually /usr/share/terminfo. // On Haiku the database can be found at /boot/system/data/terminfo - if let Some(mut homedir) = dirs::home_dir() { + if let Some(mut homedir) = home::home_dir() { homedir.push(".terminfo"); dirs_to_search.push(homedir) }