-
Notifications
You must be signed in to change notification settings - Fork 2
Replace async-trait with native async traits in zeph-tools/search_code.rs #1733
Copy link
Copy link
Closed
Labels
refactorCode refactoring without functional changesCode refactoring without functional changestech-debtTechnical debtTechnical debt
Description
Problem
crates/zeph-tools/src/search_code.rs uses the async-trait crate for SemanticSearchBackend and LspSearchBackend traits (3 occurrences). This contradicts the Edition 2024 rule: native async traits should be used everywhere.
Proposed Changes
- Remove
#[async_trait]fromSemanticSearchBackendandLspSearchBackendtrait definitions - Convert
async fndeclarations to useimpl Future<Output = ...> + Sendreturn position syntax if object safety is needed, or keepasync fnif concrete dispatch is sufficient - Update all implementations
- Remove
async-traitfromzeph-tools/Cargo.tomlif no other usages remain
Note on zeph-acp
The zeph-acp crate also uses #[async_trait::async_trait(?Send)] in ~18 places. This is likely required by the agent-client-protocol SDK which defines traits using this macro. That usage should be documented as an accepted exception rather than removed.
Files
crates/zeph-tools/src/search_code.rscrates/zeph-tools/Cargo.toml
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
refactorCode refactoring without functional changesCode refactoring without functional changestech-debtTechnical debtTechnical debt