mirror of
https://github.com/leptos-rs/leptos
synced 2024-11-10 06:44:17 +00:00
chore: new cargo fmt
(#1266)
This commit is contained in:
parent
568f7b21ae
commit
e821efca07
3 changed files with 16 additions and 10 deletions
|
@ -438,15 +438,18 @@ impl Docs {
|
|||
let mut attrs = attrs
|
||||
.iter()
|
||||
.filter_map(|attr| {
|
||||
let Meta::NameValue(attr ) = &attr.meta else {
|
||||
return None
|
||||
let Meta::NameValue(attr) = &attr.meta else {
|
||||
return None;
|
||||
};
|
||||
if !attr.path.is_ident("doc") {
|
||||
return None
|
||||
return None;
|
||||
}
|
||||
|
||||
let Some(val) = value_to_string(&attr.value) else {
|
||||
abort!(attr, "expected string literal in value of doc comment");
|
||||
abort!(
|
||||
attr,
|
||||
"expected string literal in value of doc comment"
|
||||
);
|
||||
};
|
||||
|
||||
Some((val, attr.path.span()))
|
||||
|
|
|
@ -1374,8 +1374,8 @@ pub(crate) fn parse_event_name(name: &str) -> (TokenStream, bool, bool) {
|
|||
let is_custom = event_type == "Custom";
|
||||
|
||||
let Ok(event_type) = event_type.parse::<TokenStream>() else {
|
||||
abort!(event_type, "couldn't parse event name");
|
||||
};
|
||||
abort!(event_type, "couldn't parse event name");
|
||||
};
|
||||
|
||||
let event_type = if is_custom {
|
||||
quote! { Custom::new(#name) }
|
||||
|
@ -1404,7 +1404,10 @@ pub(crate) fn slot_to_tokens(
|
|||
let span = node.name().span();
|
||||
|
||||
let Some(parent_slots) = parent_slots else {
|
||||
proc_macro_error::emit_error!(span, "slots cannot be used inside HTML elements");
|
||||
proc_macro_error::emit_error!(
|
||||
span,
|
||||
"slots cannot be used inside HTML elements"
|
||||
);
|
||||
return;
|
||||
};
|
||||
|
||||
|
|
|
@ -385,9 +385,9 @@ impl Parse for ServerFnBody {
|
|||
let docs = attrs
|
||||
.iter()
|
||||
.filter_map(|attr| {
|
||||
let Meta::NameValue(attr ) = &attr.meta else {
|
||||
return None
|
||||
};
|
||||
let Meta::NameValue(attr) = &attr.meta else {
|
||||
return None;
|
||||
};
|
||||
if !attr.path.is_ident("doc") {
|
||||
return None;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue