chore: 清理大量未使用的变量、方法及结构体警告

This commit is contained in:
2026-05-13 13:54:20 +08:00
parent b1ad68c7b5
commit 679db5b1db
7 changed files with 1115 additions and 6 deletions

115
build_output.txt Normal file
View File

@@ -0,0 +1,115 @@
cargo : src\git\mod.rs:12:5: warning: unused import: `std::os::windows::ffi::OsStringExt`
所在位置 C:\Users\zhang.liangyi\AppData\Local\Temp\trae\run-command\scripts\ps-script-b7f38558-53d0-4cf9-a03b-2655f3584d99.
ps1:12 字符: 15
+ $output = cargo check 2>&1 | Out-String; $output | Out-File -File ...
+ ~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (src\git\mod.rs:...i::OsStringExt`:String) [], RemoteException
+ FullyQualifiedErrorId : NativeCommandError
src\git\changelog.rs:162:17: warning: unused variable: `grouped`: help: if this is intentional, prefix it with an under
score: `_grouped`
src\git\changelog.rs:233:9: warning: unused variable: `version`: help: if this is intentional, prefix it with an unders
core: `_version`
src\utils\editor.rs:44:27: warning: unused variable: `code`: help: if this is intentional, prefix it with an underscore
: `_code`
src\utils\editor.rs:47:27: warning: unused variable: `notepad`: help: if this is intentional, prefix it with an undersc
ore: `_notepad`
src\config\mod.rs:555:12: warning: associated items `new` and `has_encrypted_pats` are never used
src\config\profile.rs:74:12: warning: associated items `builder`, `validate`, `get_token`, and `usage_stats` are never
used
src\config\profile.rs:351:12: warning: methods `validate` and `git_ssh_command` are never used
src\config\profile.rs:412:12: warning: methods `validate` and `program` are never used
src\config\profile.rs:465:12: warning: associated items `without_token`, `validate`, `record_usage`, and `set_has_token
` are never used
src\config\profile.rs:543:9: warning: field `profile_name` is never read
src\config\profile.rs:570:12: warning: struct `GitProfileBuilder` is never constructed
src\config\profile.rs:585:12: warning: multiple methods are never used
src\generator\mod.rs:94:18: warning: method `generate_changelog_from_repo` is never used
src\generator\mod.rs:191:12: warning: function `generate_simple_commit` is never used
src\generator\mod.rs:202:12: warning: function `generate_date_commit` is never used
src\generator\mod.rs:207:12: warning: function `generate_by_file_types` is never used
src\git\mod.rs:232:12: warning: multiple methods are never used
src\git\mod.rs:463:12: warning: multiple methods are never used
src\git\mod.rs:919:9: warning: fields `id`, `email`, and `time` are never read
src\git\mod.rs:950:9: warning: fields `target` and `message` are never read
src\git\mod.rs:961:9: warning: field `conflicted` is never read
src\git\mod.rs:967:12: warning: method `format` is never used
src\git\mod.rs:1061:8: warning: function `is_git_repo` is never used
src\git\mod.rs:1066:12: warning: struct `GitConfigHelper` is never constructed
src\git\mod.rs:1073:12: warning: multiple associated items are never used
src\git\mod.rs:1204:12: warning: methods `is_local` and `is_global` are never used
src\git\mod.rs:1249:12: warning: method `has_local_overrides` is never used
src\git\mod.rs:1256:12: warning: struct `UserConfig` is never constructed
src\git\mod.rs:1265:12: warning: methods `is_complete` and `compare` are never used
src\git\mod.rs:1303:12: warning: struct `ConfigDiff` is never constructed
src\git\changelog.rs:70:12: warning: methods `group_by_type`, `add_category`, and `generate_and_prepend` are never used
src\git\changelog.rs:382:8: warning: function `read_changelog` is never used
src\git\changelog.rs:416:8: warning: function `update_version_links` is never used
src\git\changelog.rs:426:8: warning: function `parse_versions` is never used
src\git\changelog.rs:449:8: warning: function `get_unreleased_changes` is never used
src\git\changelog.rs:460:12: warning: struct `ChangelogEntry` is never constructed
src\git\changelog.rs:468:12: warning: associated items `new` and `with_date` are never used
src\git\commit.rs:45:12: warning: methods `scope`, `body`, `footer`, `amend`, and `no_verify` are never used
src\git\commit.rs:230:8: warning: function `suggest_commit_type` is never used
src\git\commit.rs:351:12: warning: method `to_message` is never used
src\git\tag.rs:12:5: warning: field `version_prefix` is never read
src\git\tag.rs:59:12: warning: methods `version_prefix`, `version`, and `execute_and_push` are never used
src\git\tag.rs:144:12: warning: associated function `variants` is never used
src\git\tag.rs:215:8: warning: function `generate_tag_message` is never used
src\git\tag.rs:278:8: warning: function `delete_tag` is never used
src\git\tag.rs:300:8: warning: function `list_tags` is never used
src\i18n\messages.rs:660:12: warning: multiple methods are never used
src\i18n\translator.rs:5:5: warning: field `keep_types_english` is never read
src\i18n\translator.rs:18:12: warning: multiple methods are never used
src\i18n\translator.rs:225:8: warning: function `translate_commit_type` is never used
src\llm\mod.rs:33:8: warning: method `name` is never used
src\llm\mod.rs:39:5: warning: field `config` is never read
src\llm\mod.rs:44:9: warning: fields `max_tokens`, `temperature`, and `timeout` are never read
src\llm\mod.rs:113:12: warning: associated function `with_provider` is never used
src\llm\mod.rs:385:12: warning: method `to_commitlint` is never used
src\llm\ollama.rs:34:5: warning: field `done` is never read
src\llm\ollama.rs:38:8: warning: struct `ListModelsResponse` is never constructed
src\llm\ollama.rs:43:8: warning: struct `ModelInfo` is never constructed
src\llm\ollama.rs:61:12: warning: methods `with_timeout`, `list_models`, `pull_model`, and `model_exists` are never use
d
src\llm\openai.rs:68:12: warning: method `with_timeout` is never used
src\llm\openai.rs:212:12: warning: struct `AzureOpenAiClient` is never constructed
src\llm\openai.rs:222:12: warning: associated items `new` and `chat_completion` are never used
src\llm\anthropic.rs:68:12: warning: methods `with_timeout` and `list_models` are never used
src\llm\anthropic.rs:210:11: warning: constant `ANTHROPIC_MODELS` is never used
src\llm\anthropic.rs:220:8: warning: function `is_valid_model` is never used
src\llm\kimi.rs:56:12: warning: associated items `new` and `with_timeout` are never used
src\llm\kimi.rs:224:11: warning: constant `KIMI_MODELS` is never used
src\llm\kimi.rs:231:8: warning: function `is_valid_model` is never used
src\llm\deepseek.rs:56:12: warning: associated items `new` and `with_timeout` are never used
src\llm\deepseek.rs:224:11: warning: constant `DEEPSEEK_MODELS` is never used
src\llm\deepseek.rs:230:8: warning: function `is_valid_model` is never used
src\llm\openrouter.rs:56:12: warning: associated items `new` and `with_timeout` are never used
src\llm\openrouter.rs:228:11: warning: constant `OPENROUTER_MODELS` is never used
src\llm\openrouter.rs:242:8: warning: function `is_valid_model` is never used
src\utils\mod.rs:12:8: warning: function `print_success` is never used
src\utils\mod.rs:17:8: warning: function `print_error` is never used
src\utils\mod.rs:22:8: warning: function `print_warning` is never used
src\utils\mod.rs:27:8: warning: function `print_info` is never used
src\utils\mod.rs:32:8: warning: function `confirm` is never used
src\utils\mod.rs:43:8: warning: function `input` is never used
src\utils\mod.rs:64:8: warning: function `is_terminal` is never used
src\utils\mod.rs:69:8: warning: function `format_duration` is never used
src\utils\crypto.rs:82:8: warning: function `encrypt_to_file` is never used
src\utils\crypto.rs:90:8: warning: function `decrypt_from_file` is never used
src\utils\crypto.rs:97:8: warning: function `generate_token` is never used
src\utils\crypto.rs:110:8: warning: function `sha256` is never used
src\utils\editor.rs:25:8: warning: function `edit_temp` is never used
src\utils\editor.rs:39:8: warning: function `get_editor` is never used
src\utils\editor.rs:66:8: warning: function `check_editor` is never used
src\utils\formatter.rs:69:8: warning: function `wrap_text` is never used
src\utils\formatter.rs:74:8: warning: function `clean_message` is never used
src\utils\keyring.rs:12:5: warning: variant `Unavailable` is never constructed
src\utils\keyring.rs:65:12: warning: methods `status` and `has_api_key` are never used
src\utils\validators.rs:136:8: warning: function `validate_scope` is never used
src\utils\validators.rs:172:8: warning: function `validate_gpg_key_id` is never used
src\utils\validators.rs:198:8: warning: function `is_valid_commit_type` is never used
warning: `quicommit` (bin "quicommit") generated 97 warnings (run `cargo fix --bin "quicommit" -p quicommit` to apply 5
suggestions)
Finished `dev` profile [optimized + debuginfo] target(s) in 0.67s