mirror of
https://github.com/zed-industries/zed.git
synced 2026-11-27 19:09:54 +01:00
87da03ad3f
## Summary Removes unused code and redundant work. No behavior changes. - Removes about 20 unused items. Examples: - `SerializedWorkspaceLocation::sorted_paths`, which was `unimplemented!()` - `prompt_to_save_or_discard_dirty_items` - the `StatusBar` position helpers - `agent_panel_position` was the only user of `Dock::has_agent_panel`, which was the only user of `Panel::is_agent_panel`. Removes the chain, including `AgentPanel`'s impl. - `Toolbar::can_navigate` was never read. Removes it, `Pane::set_can_navigate`, and the terminal panel's call. - `Pane::in_center_group` was written by `mark_positions` and never read. Removes it, both `mark_positions` methods, `PaneGroup::is_center`, and the `cx` parameter that seven `PaneGroup` methods took only to call `mark_positions`. - Once its unused setter is gone, `Pane::close_pane_if_empty` is always `true`. - `VimCommand::has_count` and `.count()` have done nothing since #18424. - Search no longer checks `is_focused` before `window.focus`, which already returns early for the focused handle. - Removes `cx.notify()` after `start_dismiss_timer` and REPL `shutdown` and `restart`, which always notify. - Vim's `is_numeric_string` drops four emptiness checks that another check or `Iterator::all` already covers. - Drops clones and conversions made only to be borrowed, such as in vim mark lookups and `strip_prefix(..)?.to_string().chars()`. ## Testing - `./script/clippy` - `cargo test -p workspace -p search -p terminal_view -p vim -p repl -p zed -p debugger_ui` ## 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