feat: update ssh.rs
This commit is contained in:
43
ssh-rs/Cargo.lock
generated
43
ssh-rs/Cargo.lock
generated
@@ -155,10 +155,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a6cb138bb79a146c1bd460005623e142ef0181e3d0219cb493e02f7d08a35695"
|
||||
|
||||
[[package]]
|
||||
name = "itoa"
|
||||
version = "1.0.17"
|
||||
name = "json5"
|
||||
version = "1.3.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "92ecc6618181def0457392ccd0ee51198e065e016d1d527a7ac1b6dc7c1f09d2"
|
||||
checksum = "56c86c72f9e1d3fe29baa32cab8896548eef9aae271fce4e796d16b583fdf6d5"
|
||||
dependencies = [
|
||||
"serde",
|
||||
"ucd-trie",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "lazy_static"
|
||||
@@ -182,12 +186,6 @@ dependencies = [
|
||||
"libc",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "memchr"
|
||||
version = "2.7.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f52b00d39961fc5b2736ea853c9cc86238e165017a493d1d5c8eac6bdc4cc273"
|
||||
|
||||
[[package]]
|
||||
name = "once_cell_polyfill"
|
||||
version = "1.70.2"
|
||||
@@ -271,27 +269,14 @@ dependencies = [
|
||||
"syn",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "serde_json"
|
||||
version = "1.0.148"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "3084b546a1dd6289475996f182a22aba973866ea8e8b02c51d9f46b1336a22da"
|
||||
dependencies = [
|
||||
"itoa",
|
||||
"memchr",
|
||||
"serde",
|
||||
"serde_core",
|
||||
"zmij",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "ssh-rs"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"clap",
|
||||
"json5",
|
||||
"rust_util",
|
||||
"serde",
|
||||
"serde_json",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -352,6 +337,12 @@ dependencies = [
|
||||
"syn",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "ucd-trie"
|
||||
version = "0.1.7"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "2896d95c02a80c6d6a5d6e953d479f5ddf2dfdb6a244441010e373ac0fb88971"
|
||||
|
||||
[[package]]
|
||||
name = "unicode-ident"
|
||||
version = "1.0.22"
|
||||
@@ -406,9 +397,3 @@ checksum = "ae137229bcbd6cdf0f7b80a31df61766145077ddf49416a728b02cb3921ff3fc"
|
||||
dependencies = [
|
||||
"windows-link",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "zmij"
|
||||
version = "1.0.7"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "de9211a9f64b825911bdf0240f58b7a8dac217fe260fc61f080a07f61372fbd5"
|
||||
|
||||
@@ -7,4 +7,4 @@ edition = "2024"
|
||||
rust_util = "0.6.50"
|
||||
clap = { version = "4.5.49", features = ["derive"] }
|
||||
serde = { version = "1.0.228", features = ["derive"] }
|
||||
serde_json = "1.0.145"
|
||||
json5 = "1.3.0"
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
//! rust_util = "0.6.50"
|
||||
//! clap = { version = "4.5.49", features = ["derive"] }
|
||||
//! serde = { version = "1.0.228", features = ["derive"] }
|
||||
//! serde_json = "1.0.145"
|
||||
//! json5 = "1.3.0"
|
||||
//! ```
|
||||
|
||||
use clap::Parser;
|
||||
@@ -245,7 +245,7 @@ fn load_ssh_rs_config() -> XResult<SshConfig> {
|
||||
let config_file = get_ssh_rs_config_file();
|
||||
let config_content = util_file::read_file_content(&config_file)?;
|
||||
let config: SshConfig = opt_result!(
|
||||
serde_json::from_str(config_content.as_str()),
|
||||
json5::from_str(config_content.as_str()),
|
||||
"Parse config failed: {}"
|
||||
);
|
||||
Ok(config)
|
||||
@@ -255,5 +255,5 @@ fn get_ssh_rs_config_file() -> String {
|
||||
util_env::env_var(ENV_SSH_RS_CONFIG_FILE).unwrap_or_else(|| SSH_RS_CONFIG_FILE.to_string())
|
||||
}
|
||||
|
||||
// @SCRIPT-SIGNATURE-V1: yk-r1.ES256.20260102T200840+08:00.MEUCIQCIoEsCJwGL/nO9MUwA
|
||||
// q3eig5RAt+p0uE4YJPn4wIJtuwIgA+n+sXBgtYjBNZ0lDfB1+fVC7N/3K/LjeWHkxv3/J8k=
|
||||
// @SCRIPT-SIGNATURE-V1: yk-r1.ES256.20260125T102330+08:00.MEYCIQDAnPqJNTLeNAuSe+7l
|
||||
// MvVNKf/JQPgKMLAYNh1eTeW+QAIhAKHonLpd2gHZmYXZKJCOpenIzr+d6umHK1EiMw1q9yp1
|
||||
|
||||
Reference in New Issue
Block a user