Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
settings_ui: Title Case Enums (#39711)
Ben Kunkleb8a6180b82e6
diff --git a/Cargo.lock b/Cargo.lockindex f5102607322..ada56e87e59 100644--- a/Cargo.lock+++ b/Cargo.lock@@ -14370,6 +14370,7 @@ dependencies = ["futures 0.3.31","fuzzy","gpui",+ "heck 0.5.0","language","menu","node_runtime",diff --git a/crates/settings_ui/Cargo.toml b/crates/settings_ui/Cargo.tomlindex c2cb1ce62b3..0b456d0cb11 100644--- a/crates/settings_ui/Cargo.toml+++ b/crates/settings_ui/Cargo.toml@@ -18,6 +18,7 @@ test-support = [][dependencies]anyhow.workspace = truecommand_palette_hooks.workspace = true+heck.workspace = trueeditor.workspace = truefeature_flags.workspace = truefs.workspace = truediff --git a/crates/settings_ui/src/settings_ui.rs b/crates/settings_ui/src/settings_ui.rsindex dd5d953c049..6bb35d53a28 100644--- a/crates/settings_ui/src/settings_ui.rs+++ b/crates/settings_ui/src/settings_ui.rs@@ -11,6 +11,7 @@ use gpui::{ScrollHandle, Task, TitlebarOptions, UniformListScrollHandle, Window, WindowHandle,WindowOptions, actions, div, point, prelude::*, px, size, uniform_list,};+use heck::ToTitleCase as _;use project::WorktreeId;use schemars::JsonSchema;use serde::Deserialize;@@ -1639,12 +1640,12 @@ whereDropdownMenu::new("dropdown",- current_value_label,+ current_value_label.to_title_case(),ContextMenu::build(window, cx, move |mut menu, _, _| {for (&value, &label) in std::iter::zip(variants(), labels()) {let file = file.clone();menu = menu.toggleable_entry(- label,+ label.to_title_case(),value == current_value,IconPosition::Start,None,