ok/jj
1
0
Fork 0
forked from mirrors/jj

cargo: update whoami dependency to 1.5.0

This requires a code tweak to avoid clippy failures, as `whoami` 1.5.0 has
deprecated the default `hostname()` function.

Signed-off-by: Austin Seipp <aseipp@pobox.com>
This commit is contained in:
Austin Seipp 2024-03-04 18:06:52 -06:00
parent 2817e30fc6
commit bd551099f0
2 changed files with 11 additions and 4 deletions

13
Cargo.lock generated
View file

@ -3235,6 +3235,12 @@ version = "0.11.0+wasi-snapshot-preview1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423"
[[package]]
name = "wasite"
version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b8dad83b4f25e74f184f64c43b150b91efe7647395b42289f38e50566d82855b"
[[package]]
name = "wasm-bindgen"
version = "0.2.90"
@ -3331,11 +3337,12 @@ dependencies = [
[[package]]
name = "whoami"
version = "1.4.1"
version = "1.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "22fc3756b8a9133049b26c7f61ab35416c130e8c09b660f5b3958b446f52cc50"
checksum = "0fec781d48b41f8163426ed18e8fc2864c12937df9ce54c88ede7bd47270893e"
dependencies = [
"wasm-bindgen",
"redox_syscall",
"wasite",
"web-sys",
]

View file

@ -183,7 +183,7 @@ impl UserSettings {
pub fn operation_hostname(&self) -> String {
self.config
.get_string("operation.hostname")
.unwrap_or_else(|_| whoami::hostname())
.unwrap_or_else(|_| whoami::fallible::hostname().expect("valid hostname"))
}
pub fn operation_username(&self) -> String {