deps: Switch back from dirs-next to dirs (#492)

Since it's supported again, seems like a good time to switch back to
dirs.
This commit is contained in:
Clement Tsang 2021-06-06 15:58:53 -07:00 committed by GitHub
parent 2e5c08152a
commit 63f9ed6199
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 32 additions and 30 deletions

54
Cargo.lock generated
View File

@ -248,7 +248,7 @@ dependencies = [
"clap",
"crossterm",
"ctrlc",
"dirs-next",
"dirs",
"fern",
"futures",
"futures-timer",
@ -498,20 +498,19 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "524cbf6897b527295dff137cec09ecf3a05f4fddffd7dfcd1585403449e74198"
[[package]]
name = "dirs-next"
version = "2.0.0"
name = "dirs"
version = "3.0.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b98cf8ebf19c3d1b223e151f99a4f9f0690dca41414773390fc824184ac833e1"
checksum = "30baa043103c9d0c2a57cf537cc2f35623889dc0d405e6c3cccfadbc81c71309"
dependencies = [
"cfg-if 1.0.0",
"dirs-sys-next",
"dirs-sys",
]
[[package]]
name = "dirs-sys-next"
version = "0.1.1"
name = "dirs-sys"
version = "0.3.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "99de365f605554ae33f115102a02057d4fc18b01f3284d6870be0938743cfe7d"
checksum = "03d86534ed367a67548dc68113a0f5db55432fdfbb6e6f9d77704397d95d5780"
dependencies = [
"libc",
"redox_users",
@ -699,13 +698,13 @@ dependencies = [
[[package]]
name = "getrandom"
version = "0.1.15"
version = "0.2.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fc587bc0ec293155d5bfa6b9891ec18a1e330c234f896ea47fbada4cadbe47e6"
checksum = "7fcd999463524c52659517fe2cea98493cfe485d10565e7b0fb07dbba7ad2753"
dependencies = [
"cfg-if 0.1.10",
"cfg-if 1.0.0",
"libc",
"wasi 0.9.0+wasi-snapshot-preview1",
"wasi",
]
[[package]]
@ -1118,7 +1117,7 @@ dependencies = [
"cfg-if 1.0.0",
"instant",
"libc",
"redox_syscall",
"redox_syscall 0.1.57",
"smallvec",
"winapi",
]
@ -1260,13 +1259,22 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "41cc0f7e4d5d4544e8861606a285bb08d3e70712ccc7d2b84d7c0ccfaf4b05ce"
[[package]]
name = "redox_users"
version = "0.3.5"
name = "redox_syscall"
version = "0.2.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "de0737333e7a9502c789a36d7c7fa6092a49895d4faa31ca5df163857ded2e9d"
checksum = "742739e41cd49414de871ea5e549afb7e2a3ac77b589bcbebe8c82fab37147fc"
dependencies = [
"bitflags",
]
[[package]]
name = "redox_users"
version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "528532f3d801c87aec9def2add9ca802fe569e44a544afe633765267840abe64"
dependencies = [
"getrandom",
"redox_syscall",
"redox_syscall 0.2.8",
]
[[package]]
@ -1385,7 +1393,7 @@ checksum = "2c29947abdee2a218277abeca306f25789c938e500ea5a9d4b12a5a504466902"
dependencies = [
"cfg-if 1.0.0",
"libc",
"redox_syscall",
"redox_syscall 0.1.57",
"winapi",
]
@ -1458,7 +1466,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6db9e6914ab8b1ae1c260a4ae7a49b6c5611b40328a735b21862567685e73255"
dependencies = [
"libc",
"wasi 0.10.0+wasi-snapshot-preview1",
"wasi",
"winapi",
]
@ -1563,12 +1571,6 @@ version = "1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9d5b2c62b4012a3e1eca5a7e077d13b3bf498c4073e33ccd58626607748ceeca"
[[package]]
name = "wasi"
version = "0.9.0+wasi-snapshot-preview1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519"
[[package]]
name = "wasi"
version = "0.10.0+wasi-snapshot-preview1"

View File

@ -43,7 +43,7 @@ crossterm = "0.18.2"
ctrlc = { version = "3.1.9", features = ["termination"] }
clap = "2.33"
cfg-if = "1.0"
dirs-next = "2.0.0"
dirs = "3.0.2"
futures = "0.3.14"
futures-timer = "3.0.2"
fxhash = "0.2.1"

View File

@ -186,14 +186,14 @@ pub fn read_config(config_location: Option<&str>) -> error::Result<Option<PathBu
let config_path = if let Some(conf_loc) = config_location {
Some(PathBuf::from(conf_loc))
} else if cfg!(target_os = "windows") {
if let Some(home_path) = dirs_next::config_dir() {
if let Some(home_path) = dirs::config_dir() {
let mut path = home_path;
path.push(DEFAULT_CONFIG_FILE_PATH);
Some(path)
} else {
None
}
} else if let Some(home_path) = dirs_next::home_dir() {
} else if let Some(home_path) = dirs::home_dir() {
let mut path = home_path;
path.push(".config/");
path.push(DEFAULT_CONFIG_FILE_PATH);
@ -202,7 +202,7 @@ pub fn read_config(config_location: Option<&str>) -> error::Result<Option<PathBu
Some(path)
} else {
// If it does not, use the new one!
if let Some(config_path) = dirs_next::config_dir() {
if let Some(config_path) = dirs::config_dir() {
let mut path = config_path;
path.push(DEFAULT_CONFIG_FILE_PATH);
Some(path)