From 2ef2f195081ee8e81e519b60f8dcc8f00dc2881b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20J=C3=B6rdens?= Date: Tue, 24 Sep 2024 18:05:36 +0200 Subject: [PATCH] try slice NAMES --- miniconf_derive/src/tree.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/miniconf_derive/src/tree.rs b/miniconf_derive/src/tree.rs index 7c200f81..c4b9f9de 100644 --- a/miniconf_derive/src/tree.rs +++ b/miniconf_derive/src/tree.rs @@ -166,7 +166,7 @@ impl Tree { let (names, name_to_index, index_to_name, index_len) = if let Some(names) = names { ( Some(quote!( - const __MINICONF_NAMES: [&'static str; #fields_len] = [#(#names ,)*]; + const __MINICONF_NAMES: &'static [&'static str] = &[#(#names ,)*]; )), quote!(Self::__MINICONF_NAMES.iter().position(|&n| n == value)), quote!(Some(