From 94d4b1a31d056c4f53b4ccf8ba5f83b6992391f9 Mon Sep 17 00:00:00 2001
From: David Harvey-Macaulay <david@harvey-macaulay.com>
Date: Fri, 26 Apr 2024 09:37:52 +0100
Subject: [PATCH] Snake case feature name

---
 Cargo.toml                      | 2 +-
 gltf-json/Cargo.toml            | 2 +-
 gltf-json/src/extensions/mod.rs | 6 +++---
 gltf-json/src/texture.rs        | 4 ++--
 src/texture.rs                  | 4 ++--
 5 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/Cargo.toml b/Cargo.toml
index a84d8dfe..4f313766 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -38,7 +38,7 @@ version = "0.25"
 
 [features]
 default = ["import", "utils", "names"]
-allow-empty-texture = ["gltf-json/allow-empty-texture"]
+allow_empty_texture = ["gltf-json/allow_empty_texture"]
 extensions = ["gltf-json/extensions"]
 extras = ["gltf-json/extras"]
 names = ["gltf-json/names"]
diff --git a/gltf-json/Cargo.toml b/gltf-json/Cargo.toml
index 14fa1295..ff91e69a 100644
--- a/gltf-json/Cargo.toml
+++ b/gltf-json/Cargo.toml
@@ -16,7 +16,7 @@ serde_json = { features = ["raw_value"], version = "1.0" }
 
 [features]
 default = []
-allow-empty-texture = []
+allow_empty_texture = []
 names = []
 extensions = []
 extras = []
diff --git a/gltf-json/src/extensions/mod.rs b/gltf-json/src/extensions/mod.rs
index 09711a45..611a8652 100644
--- a/gltf-json/src/extensions/mod.rs
+++ b/gltf-json/src/extensions/mod.rs
@@ -53,11 +53,11 @@ pub const ENABLED_EXTENSIONS: &[&str] = &[
     #[cfg(feature = "KHR_materials_emissive_strength")]
     "KHR_materials_emissive_strength",
     // Allowlisted texture extensions. Processing is delegated to the user.
-    #[cfg(feature = "allow-empty-texture")]
+    #[cfg(feature = "allow_empty_texture")]
     "KHR_texture_basisu",
-    #[cfg(feature = "allow-empty-texture")]
+    #[cfg(feature = "allow_empty_texture")]
     "EXT_texture_webp",
-    #[cfg(feature = "allow-empty-texture")]
+    #[cfg(feature = "allow_empty_texture")]
     "MSFT_texture_dds",
 ];
 
diff --git a/gltf-json/src/texture.rs b/gltf-json/src/texture.rs
index 1d15cad1..c232f908 100644
--- a/gltf-json/src/texture.rs
+++ b/gltf-json/src/texture.rs
@@ -179,7 +179,7 @@ where
     P: Fn() -> crate::Path,
     R: FnMut(&dyn Fn() -> crate::Path, crate::validation::Error),
 {
-    if cfg!(feature = "allow-empty-texture") {
+    if cfg!(feature = "allow_empty_texture") {
         if !source_is_empty(source) {
             source.validate(root, path, report);
         }
@@ -467,7 +467,7 @@ mod tests {
                 errors.push((path(), error));
             },
         );
-        if cfg!(feature = "allow-empty-texture") {
+        if cfg!(feature = "allow_empty_texture") {
             assert!(errors.is_empty());
         } else {
             assert_eq!(1, errors.len());
diff --git a/src/texture.rs b/src/texture.rs
index 26d4e45d..bd99b024 100644
--- a/src/texture.rs
+++ b/src/texture.rs
@@ -158,7 +158,7 @@ impl<'a> Texture<'a> {
     }
 
     /// Returns the image used by this texture.
-    #[cfg(feature = "allow-empty-texture")]
+    #[cfg(feature = "allow_empty_texture")]
     pub fn source(&self) -> Option<image::Image<'a>> {
         let index = self.json.source.value();
         if index == u32::MAX as usize {
@@ -169,7 +169,7 @@ impl<'a> Texture<'a> {
     }
 
     /// Returns the image used by this texture.
-    #[cfg(not(feature = "allow-empty-texture"))]
+    #[cfg(not(feature = "allow_empty_texture"))]
     pub fn source(&self) -> image::Image<'a> {
         self.document
             .images()