Replace dirs and directories with maintained (#2949)

This commit is contained in:
Caden Haustein
2021-01-19 20:24:27 +00:00
committed by GitHub
parent 2e6d836dd1
commit 430da53f0b
11 changed files with 389 additions and 302 deletions

View File

@ -145,7 +145,7 @@ pub fn value_to_toml_value(v: &Value) -> Result<toml::Value, ShellError> {
#[cfg(feature = "directories")]
pub fn config_path() -> Result<PathBuf, ShellError> {
use directories::ProjectDirs;
use directories_next::ProjectDirs;
let dir = ProjectDirs::from("org", "nushell", "nu")
.ok_or_else(|| ShellError::untagged_runtime_error("Couldn't find project directory"))?;
@ -181,7 +181,7 @@ pub fn default_path_for(file: &Option<PathBuf>) -> Result<PathBuf, ShellError> {
#[cfg(feature = "directories")]
pub fn user_data() -> Result<PathBuf, ShellError> {
use directories::ProjectDirs;
use directories_next::ProjectDirs;
let dir = ProjectDirs::from("org", "nushell", "nu")
.ok_or_else(|| ShellError::untagged_runtime_error("Couldn't find project directory"))?;