mirror of
https://github.com/nushell/nushell.git
synced 2025-08-09 21:27:45 +02:00
Remove dir-s/ectories/ectories-support features (#3647)
This commit is contained in:
@ -15,8 +15,8 @@ byte-unit = "4.0.9"
|
||||
chrono = "0.4.19"
|
||||
common-path = "1.0.0"
|
||||
derive-new = "0.5.8"
|
||||
directories-next = { version = "2.0.0", optional = true }
|
||||
dirs-next = { version = "2.0.0", optional = true }
|
||||
directories-next = "2.0.0"
|
||||
dirs-next = "2.0.0"
|
||||
getset = "0.1.1"
|
||||
indexmap = { version = "1.6.1", features = ["serde-1"] }
|
||||
log = "0.4.14"
|
||||
@ -48,6 +48,4 @@ features = ["strings", "checked_arithmetic"]
|
||||
users = "0.11.0"
|
||||
|
||||
[features]
|
||||
directories = ["directories-next"]
|
||||
dirs = ["dirs-next"]
|
||||
dataframe = ["nu-protocol/dataframe", "polars"]
|
||||
|
@ -161,7 +161,6 @@ pub fn value_to_toml_value(v: &Value) -> Result<toml::Value, ShellError> {
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(feature = "directories")]
|
||||
pub fn config_path() -> Result<PathBuf, ShellError> {
|
||||
use directories_next::ProjectDirs;
|
||||
|
||||
@ -175,13 +174,6 @@ pub fn config_path() -> Result<PathBuf, ShellError> {
|
||||
Ok(path)
|
||||
}
|
||||
|
||||
#[cfg(not(feature = "directories"))]
|
||||
pub fn config_path() -> Result<PathBuf, ShellError> {
|
||||
// FIXME: unsure if this should be error or a simple default
|
||||
|
||||
Ok(std::path::PathBuf::from("/"))
|
||||
}
|
||||
|
||||
pub fn default_path() -> Result<PathBuf, ShellError> {
|
||||
default_path_for(&None)
|
||||
}
|
||||
@ -197,7 +189,6 @@ pub fn default_path_for(file: &Option<PathBuf>) -> Result<PathBuf, ShellError> {
|
||||
Ok(filename)
|
||||
}
|
||||
|
||||
#[cfg(feature = "directories")]
|
||||
pub fn user_data() -> Result<PathBuf, ShellError> {
|
||||
use directories_next::ProjectDirs;
|
||||
|
||||
@ -214,13 +205,6 @@ pub fn user_data() -> Result<PathBuf, ShellError> {
|
||||
Ok(path)
|
||||
}
|
||||
|
||||
#[cfg(not(feature = "directories"))]
|
||||
pub fn user_data() -> Result<PathBuf, ShellError> {
|
||||
// FIXME: unsure if this should be error or a simple default
|
||||
|
||||
Ok(std::path::PathBuf::from("/"))
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
pub enum Status {
|
||||
LastModified(std::time::SystemTime),
|
||||
|
Reference in New Issue
Block a user