Skip to content

Commit

Permalink
Revert "try slice NAMES"
Browse files Browse the repository at this point in the history
This reverts commit 2ef2f19.
  • Loading branch information
jordens committed Sep 24, 2024
1 parent 2ef2f19 commit 46b49ab
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion miniconf_derive/src/tree.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 [&'static str] = &[#(#names ,)*];
const __MINICONF_NAMES: [&'static str; #fields_len] = [#(#names ,)*];
)),
quote!(Self::__MINICONF_NAMES.iter().position(|&n| n == value)),
quote!(Some(
Expand Down

0 comments on commit 46b49ab

Please sign in to comment.