gpui: Reduce manual shifting & other minor improvements (#34407)

Minor cleanup in gpui.

- Reduce manual shifting by using `u32::to_be_bytes`
- Remove eager `Vec` allocation when listing registered actions
- Remove unnecessary return statements
- Replace manual `if let Some(_)` with `.as_deref_mut()`

Release Notes:

- N/A
This commit is contained in:
tidely 2025-07-15 17:39:33 +03:00 committed by GitHub
parent 05065985e7
commit d1abba0d33
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 12 additions and 25 deletions

View file

@ -243,7 +243,6 @@ struct ActionDef {
fn dump_all_gpui_actions() -> Vec<ActionDef> {
let mut actions = gpui::generate_list_of_all_registered_actions()
.into_iter()
.map(|action| ActionDef {
name: action.name,
human_name: command_palette::humanize_action_name(action.name),