lint fixes for 'cargo clippy --workspace --all-targets -- -D warnings' and 'cargo test --workspace'

This commit is contained in:
turbolego
2026-03-24 22:23:06 +01:00
parent db86ff4ce3
commit c926372d81
6 changed files with 3016 additions and 30 deletions
Generated
+14 -14
View File
@@ -3812,7 +3812,7 @@ dependencies = [
[[package]]
name = "openfang-api"
version = "0.4.9"
version = "0.5.1"
dependencies = [
"async-trait",
"axum",
@@ -3852,7 +3852,7 @@ dependencies = [
[[package]]
name = "openfang-channels"
version = "0.4.9"
version = "0.5.1"
dependencies = [
"aes",
"async-trait",
@@ -3889,7 +3889,7 @@ dependencies = [
[[package]]
name = "openfang-cli"
version = "0.4.9"
version = "0.5.1"
dependencies = [
"clap",
"clap_complete",
@@ -3916,7 +3916,7 @@ dependencies = [
[[package]]
name = "openfang-desktop"
version = "0.4.9"
version = "0.5.1"
dependencies = [
"axum",
"open",
@@ -3942,7 +3942,7 @@ dependencies = [
[[package]]
name = "openfang-extensions"
version = "0.4.9"
version = "0.5.1"
dependencies = [
"aes-gcm",
"argon2",
@@ -3970,7 +3970,7 @@ dependencies = [
[[package]]
name = "openfang-hands"
version = "0.4.9"
version = "0.5.1"
dependencies = [
"chrono",
"dashmap",
@@ -3987,7 +3987,7 @@ dependencies = [
[[package]]
name = "openfang-kernel"
version = "0.4.9"
version = "0.5.1"
dependencies = [
"async-trait",
"chrono",
@@ -4025,7 +4025,7 @@ dependencies = [
[[package]]
name = "openfang-memory"
version = "0.4.9"
version = "0.5.1"
dependencies = [
"async-trait",
"chrono",
@@ -4044,7 +4044,7 @@ dependencies = [
[[package]]
name = "openfang-migrate"
version = "0.4.9"
version = "0.5.1"
dependencies = [
"chrono",
"dirs 6.0.0",
@@ -4063,7 +4063,7 @@ dependencies = [
[[package]]
name = "openfang-runtime"
version = "0.4.9"
version = "0.5.1"
dependencies = [
"anyhow",
"async-trait",
@@ -4097,7 +4097,7 @@ dependencies = [
[[package]]
name = "openfang-skills"
version = "0.4.9"
version = "0.5.1"
dependencies = [
"chrono",
"hex",
@@ -4120,7 +4120,7 @@ dependencies = [
[[package]]
name = "openfang-types"
version = "0.4.9"
version = "0.5.1"
dependencies = [
"async-trait",
"chrono",
@@ -4139,7 +4139,7 @@ dependencies = [
[[package]]
name = "openfang-wire"
version = "0.4.9"
version = "0.5.1"
dependencies = [
"async-trait",
"chrono",
@@ -8818,7 +8818,7 @@ checksum = "b9cc00251562a284751c9973bace760d86c0276c471b4be569fe6b068ee97a56"
[[package]]
name = "xtask"
version = "0.4.9"
version = "0.5.1"
[[package]]
name = "yoke"
+8 -12
View File
@@ -2115,18 +2115,14 @@ fn cmd_doctor(json: bool, repair: bool) {
ui::check_ok(".env file (permissions fixed to 0600)");
}
repaired = true;
} else {
if !json {
ui::check_warn(&format!(
".env file has loose permissions ({:o}), should be 0600",
mode
));
}
}
} else {
if !json {
ui::check_ok(".env file");
} else if !json {
ui::check_warn(&format!(
".env file has loose permissions ({:o}), should be 0600",
mode
));
}
} else if !json {
ui::check_ok(".env file");
}
}
#[cfg(not(unix))]
@@ -6847,4 +6843,4 @@ args = ["-y", "@modelcontextprotocol/server-github"]
assert!(!is_openfang_path_line("# openfang config", dir));
assert!(!is_openfang_path_line("alias of=openfang", dir));
}
}
}
File diff suppressed because it is too large Load Diff
@@ -269,8 +269,8 @@ mod tests {
#[test]
fn test_embedded_files_not_empty() {
assert!(!GATEWAY_INDEX_JS.is_empty());
assert!(!GATEWAY_PACKAGE_JSON.is_empty());
assert_ne!(GATEWAY_INDEX_JS, "");
assert_ne!(GATEWAY_PACKAGE_JSON, "");
assert!(GATEWAY_INDEX_JS.contains("WhatsApp"));
assert!(GATEWAY_PACKAGE_JSON.contains("@openfang/whatsapp-gateway"));
}
+1 -1
View File
@@ -144,6 +144,6 @@ mod tests {
fn test_constants() {
assert!(GITHUB_DEVICE_CODE_URL.starts_with("https://"));
assert!(GITHUB_TOKEN_URL.starts_with("https://"));
assert!(!COPILOT_CLIENT_ID.is_empty());
assert_ne!(COPILOT_CLIENT_ID, "");
}
}
+1 -1
View File
@@ -308,6 +308,6 @@ mod tests {
#[test]
fn test_azure_openai_base_url_empty() {
// Azure requires user-supplied URL, so the constant must be empty.
assert!(AZURE_OPENAI_BASE_URL.is_empty());
assert_eq!(AZURE_OPENAI_BASE_URL, "");
}
}