Skip to content

Commit 045ad45

Browse files
committed
[review] find_unstable_variant -> any_unstable_variant
1 parent 73b88ed commit 045ad45

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

config_proc_macro/src/attrs.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ pub fn find_config_value(attrs: &[syn::Attribute]) -> Option<String> {
3030
}
3131

3232
/// Returns `true` if the there is at least one `unstable` attribute in the given slice.
33-
pub fn find_unstable_variant(attrs: &[syn::Attribute]) -> bool {
33+
pub fn any_unstable_variant(attrs: &[syn::Attribute]) -> bool {
3434
attrs.iter().any(is_unstable_variant)
3535
}
3636

config_proc_macro/src/item_enum.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ fn config_value_of_variant(variant: &syn::Variant) -> String {
161161
}
162162

163163
fn unstable_of_variant(variant: &syn::Variant) -> bool {
164-
find_unstable_variant(&variant.attrs)
164+
any_unstable_variant(&variant.attrs)
165165
}
166166

167167
fn impl_serde(ident: &syn::Ident, variants: &Variants) -> TokenStream {

0 commit comments

Comments
 (0)