Miguel Raz Guzmán Macedo
6c4b9ae965
Replace panicking unwraps in iterator and Option chains ( #61277 )
...
# Objective
Remove `.unwrap()` calls in iterator/`Option` chains that could panic at
runtime.
## Solution
Use `and_then`/`filter_map` with `.ok()` for fallible downcasts
(`entry_view_state.rs`) and keystroke parsing (`vim/command.rs`); use a
descriptive `expect` in `suggest_autoindents` where the invariant is
intentional (`buffer.rs`).
## Testing
- `cargo test -p language buffer` (69 passed)
- `cargo test -p vim command` (26 passed)
- `cargo test -p agent_ui entry_view` (3 passed)
## Self-Review Checklist:
- [x] I have reviewed my own diff for quality, security, and reliability
- [ ] Unsafe blocks (if any) have justifying comments
- [ ] The content adheres to Zed's UI standards
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable
Release Notes:
- N/A
2026-07-23 07:54:43 +00:00
..
2026-07-21 14:55:19 +00:00
2026-06-22 09:04:29 +00:00
2026-07-20 16:17:02 +00:00
2026-07-13 16:37:28 +00:00
2026-07-22 22:39:21 +00:00
2026-07-10 11:22:16 +00:00
2026-07-10 22:51:41 +00:00
2026-06-08 14:57:47 +00:00
2026-07-23 07:54:43 +00:00
2026-06-18 20:51:36 +00:00
2026-07-20 17:23:54 +00:00
2026-07-20 16:14:26 +00:00
2026-06-05 16:49:42 +00:00
2026-07-07 10:23:28 +00:00
2026-05-01 22:33:54 +00:00
2026-06-07 16:55:18 +00:00
2026-07-15 16:31:19 +00:00
2026-06-18 02:47:10 +00:00
2026-06-01 04:40:13 +00:00
2026-07-20 16:17:02 +00:00
2026-06-23 09:13:28 +00:00
2026-06-29 20:21:46 +00:00
2026-07-18 19:56:01 +00:00
2026-07-21 08:16:15 +00:00
2026-07-21 13:20:31 +00:00
2026-07-14 11:40:24 +00:00
2026-07-15 13:14:36 +00:00
2026-07-06 22:12:33 +00:00
2026-07-23 07:53:30 +00:00
2026-07-22 16:57:34 +00:00
2026-06-05 10:32:57 +00:00
2026-07-21 09:13:56 +00:00
2026-06-05 10:32:57 +00:00
2026-05-29 07:06:57 +00:00
2026-06-15 03:26:51 +00:00
2026-07-03 18:24:54 +00:00
2026-07-15 13:14:36 +00:00
2026-05-28 15:00:31 +00:00
2026-07-07 10:27:57 +00:00
2026-07-14 21:47:47 +00:00
2026-07-20 04:08:28 +00:00
2026-06-15 10:55:39 +00:00
2026-04-29 10:27:47 +00:00
2026-04-24 10:29:51 +00:00
2026-05-13 23:35:10 +00:00
2026-07-20 11:17:21 +00:00
2026-06-02 13:29:23 +00:00
2026-07-23 05:11:37 +00:00
2026-07-13 16:37:28 +00:00
2026-07-08 20:54:51 +00:00
2026-07-16 09:41:21 +00:00
2026-07-08 12:36:29 +00:00
2026-07-15 08:33:25 +00:00
2026-07-18 18:48:49 +00:00
2026-07-15 13:14:36 +00:00
2026-07-15 13:14:36 +00:00
2026-07-23 07:53:30 +00:00
2026-06-05 19:24:28 +00:00
2026-07-13 16:37:28 +00:00
2026-06-29 15:58:53 +00:00
2026-07-21 10:42:39 +00:00
2026-07-10 11:51:16 +00:00
2026-07-14 15:02:41 +00:00
2026-07-15 08:33:25 +00:00
2026-06-23 09:33:47 +00:00
2026-07-22 22:39:21 +00:00
2026-04-18 06:34:19 +00:00
2026-05-04 06:30:47 +00:00
2026-07-21 11:59:11 +00:00
2026-07-22 12:01:29 +00:00
2026-06-12 12:27:28 +00:00
2026-07-15 08:33:25 +00:00
2026-07-18 19:02:25 +00:00
2026-06-15 08:48:19 +00:00
2026-07-22 12:01:29 +00:00
2026-07-13 16:37:28 +00:00
2026-07-09 12:05:50 +00:00
2026-07-23 06:26:38 +00:00
2026-07-22 12:46:55 +00:00
2026-07-21 07:58:16 +00:00
2026-07-08 15:52:48 +00:00
2026-04-24 08:58:26 +00:00
2026-06-16 13:47:55 +00:00
2026-06-16 13:47:55 +00:00
2026-07-22 13:12:36 +00:00
2026-07-21 07:58:16 +00:00
2026-07-22 15:25:22 +00:00
2026-07-21 11:27:16 +00:00
2026-07-20 13:21:18 +00:00
2026-07-14 15:29:30 +00:00
2026-07-20 12:48:40 +00:00
2026-07-21 13:16:56 +00:00
2026-04-22 22:22:10 +00:00
2026-06-12 12:27:28 +00:00
2026-06-22 18:20:57 +00:00
2026-05-05 22:41:13 +00:00
2026-06-25 17:30:12 +00:00
2026-07-14 10:07:58 +00:00
2026-07-23 07:54:43 +00:00
2026-07-23 04:49:39 +00:00
2026-07-15 10:46:01 +00:00
2026-07-14 08:59:10 +00:00
2026-07-14 15:04:47 +00:00
2026-07-21 14:51:27 +00:00
2026-07-09 12:05:50 +00:00
2026-07-13 16:37:28 +00:00
2026-07-14 15:02:41 +00:00
2026-07-23 07:53:27 +00:00
2026-07-13 16:37:28 +00:00
2026-07-03 09:50:42 +00:00
2026-07-03 09:50:42 +00:00
2026-06-29 13:24:33 +00:00
2026-07-10 15:32:21 +00:00
2026-07-18 08:04:17 +00:00
2026-07-15 14:36:43 +00:00
2026-07-20 05:47:22 +00:00
2026-07-22 09:10:58 +00:00
2026-07-21 07:58:16 +00:00
2026-06-22 15:42:12 +00:00
2026-07-14 15:02:41 +00:00
2026-06-02 12:03:05 +00:00
2026-07-21 14:51:27 +00:00
2026-07-19 05:36:35 +00:00
2026-07-14 16:21:54 +00:00
2026-05-29 07:06:57 +00:00
2026-05-14 21:03:56 +00:00
2026-06-23 09:21:31 +00:00
2026-07-06 11:37:43 +00:00
2026-07-13 11:08:22 +00:00
2026-07-22 08:42:34 +00:00
2026-06-23 23:01:58 +00:00
2026-07-13 12:13:49 +00:00
2026-07-17 11:41:08 +00:00
2026-07-08 12:10:32 +00:00
2026-05-12 15:52:52 +00:00
2026-07-15 12:17:10 +00:00
2026-07-15 08:33:25 +00:00
2026-07-22 08:42:34 +00:00
2026-07-14 17:18:23 +00:00
2026-06-10 12:02:29 +00:00
2026-06-13 05:21:05 +00:00
2026-07-23 07:54:28 +00:00
2026-05-05 22:41:13 +00:00
2026-07-18 19:56:01 +00:00
2026-07-15 08:33:25 +00:00
2026-06-05 19:46:05 +00:00
2026-07-23 07:53:30 +00:00
2026-07-22 15:25:22 +00:00
2026-05-15 21:17:43 +00:00
2026-07-21 14:15:32 +00:00
2026-04-16 16:36:09 -07:00
2026-07-23 07:53:30 +00:00
2026-07-20 13:28:46 +00:00
2026-07-03 01:00:54 +00:00
2026-05-27 10:31:53 +00:00
2026-07-16 09:41:21 +00:00
2026-07-10 22:51:41 +00:00
2026-07-14 08:59:10 +00:00
2026-07-23 07:53:30 +00:00
2026-07-07 11:48:14 +00:00
2026-07-21 11:01:05 +00:00
2026-07-22 21:48:46 +00:00
2026-07-14 15:02:41 +00:00
2026-06-23 09:33:47 +00:00
2026-07-21 06:04:06 +00:00
2026-05-05 16:25:56 +00:00
2026-07-17 23:58:06 +00:00
2026-07-20 11:17:43 +00:00
2026-04-29 10:27:47 +00:00
2026-07-23 04:49:39 +00:00
2026-04-24 10:29:51 +00:00
2026-05-27 19:33:04 +00:00
2026-05-27 10:31:53 +00:00
2026-07-20 04:08:28 +00:00
2026-05-04 06:30:47 +00:00
2026-06-23 09:33:47 +00:00
2026-06-09 22:46:22 +00:00
2026-07-20 11:17:21 +00:00
2026-07-23 03:47:47 +00:00
2026-07-22 08:50:59 +00:00
2026-07-19 05:36:35 +00:00
2026-07-01 17:36:23 +00:00
2026-06-23 09:33:47 +00:00
2026-07-02 05:04:24 +00:00
2026-05-28 19:43:30 +00:00
2026-07-21 06:44:38 +00:00
2026-07-13 16:37:28 +00:00
2026-07-23 03:38:00 +00:00
2026-07-01 04:25:40 +00:00
2026-05-29 07:06:57 +00:00
2026-06-08 14:59:39 +00:00
2026-07-23 07:53:27 +00:00
2026-07-23 07:54:43 +00:00
2026-05-27 10:31:53 +00:00
2026-06-09 12:06:49 +00:00
2026-05-01 22:33:54 +00:00
2026-07-22 15:25:22 +00:00
2026-07-23 07:24:08 +00:00
2026-05-29 16:28:27 +00:00
2026-07-22 23:21:07 +00:00
2026-07-20 11:17:21 +00:00
2026-07-18 18:48:49 +00:00
2026-07-01 15:18:54 +00:00
2026-05-28 20:19:17 +00:00
2026-05-28 20:19:17 +00:00