Skip to content

Commit

Permalink
fix(workflows): fix docs on macros (#1075)
Browse files Browse the repository at this point in the history
<!-- Please make sure there is an issue that this PR is correlated to. -->

## Changes

<!-- If there are frontend changes, please include screenshots. -->
  • Loading branch information
MasterPtato committed Aug 19, 2024
1 parent 21dbd6c commit 1175ae5
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions lib/chirp-workflow/macros/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -487,7 +487,7 @@ fn parse_config(attrs: &[syn::Attribute]) -> syn::Result<Config> {
} else if ident == "timeout" {
config.timeout = syn::parse::<syn::LitInt>(name_value.value.to_token_stream().into())?
.base10_parse()?;
} else {
} else if ident != "doc" {
return Err(syn::Error::new(
ident.span(),
format!("Unknown config property `{ident}`"),
Expand All @@ -512,7 +512,7 @@ fn parse_msg_config(attrs: &[syn::Attribute]) -> syn::Result<MessageConfig> {
if ident == "tail_ttl" {
config.tail_ttl = syn::parse::<syn::LitInt>(name_value.value.to_token_stream().into())?
.base10_parse()?;
} else {
} else if ident != "doc" {
return Err(syn::Error::new(
ident.span(),
format!("Unknown config property `{ident}`"),
Expand All @@ -531,10 +531,12 @@ fn parse_empty_config(attrs: &[syn::Attribute]) -> syn::Result<()> {

let ident = name_value.path.require_ident()?;

return Err(syn::Error::new(
ident.span(),
format!("Unknown config property `{ident}`"),
));
if ident != "doc" {
return Err(syn::Error::new(
ident.span(),
format!("Unknown config property `{ident}`"),
));
}
}

Ok(())
Expand Down

0 comments on commit 1175ae5

Please sign in to comment.