Skip to content

Commit e6eba5d

Browse files
Swap dirs-next dependency to cargo-team maintained home crate (#1207)
Move to the smaller, cargo-team maintained `home` crate Signed-off-by: Utkarsh Gupta <[email protected]> Co-authored-by: Eirik A <[email protected]>
1 parent 20a6f2e commit e6eba5d

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

kube-client/Cargo.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ gzip = ["client", "tower-http/decompression-gzip"]
2626
client = ["config", "__non_core", "hyper", "http-body", "tower", "tower-http", "hyper-timeout", "pin-project", "chrono", "jsonpath_lib", "bytes", "futures", "tokio", "tokio-util", "either"]
2727
jsonpatch = ["kube-core/jsonpatch"]
2828
admission = ["kube-core/admission"]
29-
config = ["__non_core", "pem", "dirs"]
29+
config = ["__non_core", "pem", "home"]
3030

3131
# private feature sets; do not use
3232
__non_core = ["tracing", "serde_yaml", "base64"]
@@ -39,7 +39,7 @@ rustdoc-args = ["--cfg", "docsrs"]
3939
[dependencies]
4040
base64 = { version = "0.20.0", optional = true }
4141
chrono = { version = "0.4.23", optional = true, default-features = false }
42-
dirs = { package = "dirs-next", optional = true, version = "2.0.0" }
42+
home = { version = "0.5.4", optional = true }
4343
serde = { version = "1.0.130", features = ["derive"] }
4444
serde_json = "1.0.68"
4545
serde_yaml = { version = "0.9.19", optional = true }

kube-client/src/config/file_config.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -555,8 +555,7 @@ fn ensure_trailing_newline(mut data: Vec<u8>) -> Vec<u8> {
555555

556556
/// Returns kubeconfig path from `$HOME/.kube/config`.
557557
fn default_kube_path() -> Option<PathBuf> {
558-
use dirs::home_dir;
559-
home_dir().map(|h| h.join(".kube").join("config"))
558+
home::home_dir().map(|h| h.join(".kube").join("config"))
560559
}
561560

562561
#[cfg(test)]

0 commit comments

Comments
 (0)