mirror of
https://github.com/zed-industries/zed.git
synced 2026-11-26 18:40:25 +01:00
886dab4069
## Summary
Removes unused code and redundant checks. No behavior changes.
- Removes four unused `EditPredictionStore` methods, and
`RelatedExcerptStore::set_related_files`, whose only caller was one of
them.
- Removes `ContextRetrievalStartedDebugEvent::search_prompt`, which was
always empty and never read, plus three unused constants.
- Rate predictions modal: removes `cx.notify()` after
`select_completion` and `confirm`, which notify on every path.
- CLI: removes `exists()` checks before `read_to_string`,
`create_dir_all`, `remove_file` and `remove_dir_all`. Each call already
handles a missing path.
- `zeta_prompt`: `ends_with('\n') && !is_empty()` becomes
`ends_with('\n')`.
## Testing
- `./script/clippy`
- `cargo test -p edit_prediction -p edit_prediction_context -p
edit_prediction_cli -p edit_prediction_ui -p zeta_prompt`
## Self-review
- [x] I've reviewed my diff for quality, security, reliability, and
performance.
- [x] UI changes follow the
[checklist](https://zed.dev/docs/development/ui-checklist).
- [x] Tests cover the new or changed behavior.
Release Notes:
- N/A