Skip to content

Visual Studio Code, rebuilt in Rust

Rust

fix(menus): API_MENUS is a slice, parallel branches each adding an entry broke the fixed length

rokartur4e1529e3c69a
diff --git a/native/crates/app/src/menus.rs b/native/crates/app/src/menus.rs
index 4b1054cf6b3..c3bf9b85d3b 100644
--- a/native/crates/app/src/menus.rs
+++ b/native/crates/app/src/menus.rs
@@ -978,7 +978,7 @@ pub fn workbench_menus() -> Vec<MenuItem> {
/// menusExtensionPoint.ts `apiMenus`: the `contributes.menus` keys of the menus the port shows. `commandPalette`
/// is read by `command_palette::menu`.
-const API_MENUS: [(&str, MenuId); 59] = [
+const API_MENUS: &[(&str, MenuId)] = &[
("file/newFile", MenuId::NewFile),
("editor/context", MenuId::EditorContext),
("explorer/context", MenuId::ExplorerContext),