-
Notifications
You must be signed in to change notification settings - Fork 1
[Refactor] Remove dead code markers and fix all clippy warnings #64
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Refactor] Remove dead code markers and fix all clippy warnings #64
Conversation
Co-authored-by: oleander <220827+oleander@users.noreply.github.com>
oleander
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@copilot Failing CI.
Co-authored-by: oleander <220827+oleander@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR removes dead code suppression directives and eliminates all associated dead code to achieve zero clippy warnings. The refactoring focuses on cleaning up unused structs, constants, imports, and test code that were previously masked by #![allow(dead_code)] directives.
- Removed
#![allow(dead_code)]suppressions from hook modules - Eliminated unused structs, constants, imports, and test code
- Fixed formatting issues that caused CI failures
#![allow(dead_code)]fromsrc/hook.rsandsrc/bin/hook.rsand fix all warningssrc/hook.rssrc/bin/hook.rsStringPoolstruct (lines 62-85 in hook.rs) - REMOVED (unused except in tests)Argsstruct in hook.rs (lines 50-58) - REMOVED (duplicated bin/hook.rs, completely unused)MAX_POOL_SIZEconstant - REMOVED (only used by removed StringPool)handle_commitmethod in bin/hook.rs - REMOVED (dead code, functionality duplicated in execute)BUFFER_SIZEandCONTEXT_PREFIX- REMOVEDstructopt::StructOptfrom hook.rs andai::model::Modelfrom bin/hook.rs - REMOVEDcargo fixandcargo clippy --fix- No changes needed#![allow(dead_code)]directives remain: ✅ All removedcargo fmtto resolve extra blank linesSummary: Successfully removed all dead code suppressions and eliminated 8 pieces of dead code. Fixed CI failure caused by formatting issues where extra blank lines were not following the project's rustfmt rules. All verification criteria now met with zero clippy warnings and proper formatting.
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.