Skip to content

Commit

Permalink
Disallow empty values
Browse files Browse the repository at this point in the history
  • Loading branch information
FlickerSoul committed Jul 19, 2024
1 parent 3159db0 commit 2a4fe7d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pyo3-macros-backend/src/pyfunction.rs
Original file line number Diff line number Diff line change
Expand Up @@ -104,11 +104,11 @@ impl Parse for PyFunctionDeprecatedAttribute {
if lookahead.peek(attributes::kw::message) {
content.parse::<attributes::kw::message>()?;
content.parse::<Token![=]>()?;
message = content.parse().ok();
message = content.parse().map(Some)?;
} else if lookahead.peek(attributes::kw::category) {
content.parse::<attributes::kw::category>()?;
content.parse::<Token![=]>()?;
category = content.parse().ok();
category = content.parse().map(Some)?;
} else {
return Err(lookahead.error());
}
Expand Down

0 comments on commit 2a4fe7d

Please sign in to comment.