Skip to content

Commit

Permalink
fix clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
ealmloff committed Oct 19, 2023
1 parent ad9c59c commit 42eb4b5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/core-macro/src/props/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -467,7 +467,7 @@ fn type_from_inside_option(ty: &syn::Type, check_option_name: bool) -> Option<&s

mod struct_info {
use proc_macro2::TokenStream;
use quote::{quote, quote_spanned};
use quote::quote;
use syn::parse::Error;
use syn::punctuated::Punctuated;
use syn::Expr;
Expand Down Expand Up @@ -706,7 +706,7 @@ Finally, call `.build()` to create the instance of `{name}`.
ty: field_type,
..
} = field;
if field_name.to_string() == "key" {
if *field_name == "key" {
return Err(Error::new_spanned(field_name, "Naming a prop `key` is not allowed because the name can conflict with the built in key attribute. See https://dioxuslabs.com/learn/0.4/reference/dynamic_rendering#rendering-lists for more information about keys"));
}
let StructInfo {
Expand Down

0 comments on commit 42eb4b5

Please sign in to comment.