Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
extension: Use `heck` instead of `convert_case` for snake_case check (#28608)
Marshall Bowers141ad72d9794
diff --git a/Cargo.lock b/Cargo.lockindex 671e33453c4..fc906cf2594 100644--- a/Cargo.lock+++ b/Cargo.lock@@ -4979,10 +4979,10 @@ dependencies = ["async-tar","async-trait","collections",- "convert_case 0.8.0","fs","futures 0.3.31","gpui",+ "heck 0.5.0","http_client","language","log",diff --git a/Cargo.toml b/Cargo.tomlindex 6802dff21ca..70634e87bc6 100644--- a/Cargo.toml+++ b/Cargo.toml@@ -443,6 +443,7 @@ futures-lite = "1.13"git2 = { version = "0.20.1", default-features = false }globset = "0.4"handlebars = "4.3"+heck = "0.5"heed = { version = "0.21.0", features = ["read-txn-no-tls"] }hex = "0.4.3"html5ever = "0.27.0"diff --git a/crates/extension/Cargo.toml b/crates/extension/Cargo.tomlindex 5031e1cb850..cf89f41dda2 100644--- a/crates/extension/Cargo.toml+++ b/crates/extension/Cargo.toml@@ -17,10 +17,10 @@ async-compression.workspace = trueasync-tar.workspace = trueasync-trait.workspace = truecollections.workspace = true-convert_case.workspace = truefs.workspace = truefutures.workspace = truegpui.workspace = true+heck.workspace = truehttp_client.workspace = truelanguage.workspace = truelog.workspace = truediff --git a/crates/extension/src/extension_builder.rs b/crates/extension/src/extension_builder.rsindex 162f926ddab..c6636f03d2b 100644--- a/crates/extension/src/extension_builder.rs+++ b/crates/extension/src/extension_builder.rs@@ -4,9 +4,9 @@ use crate::{use anyhow::{Context as _, Result, anyhow, bail};use async_compression::futures::bufread::GzipDecoder;use async_tar::Archive;-use convert_case::{Case, Casing as _};use futures::AsyncReadExt;use futures::io::BufReader;+use heck::ToSnakeCase;use http_client::{self, AsyncBody, HttpClient};use serde::Deserialize;use std::{@@ -106,7 +106,7 @@ impl ExtensionBuilder {}for (grammar_name, grammar_metadata) in &extension_manifest.grammars {- let snake_cased_grammar_name = grammar_name.to_case(Case::Snake);+ let snake_cased_grammar_name = grammar_name.to_snake_case();if grammar_name.as_ref() != snake_cased_grammar_name.as_str() {bail!("grammar name '{grammar_name}' must be written in snake_case: {snake_cased_grammar_name}"