Created
October 19, 2022 20:30
-
-
Save CarlKCarlK/a6eeec89ecd23a10c8d55b2f4372b5c9 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Even if the where clause is None, we still need to return an empty Punctuated | |
| fn extract_where_predicates(item_fn: &ItemFn) -> Punctuated<WherePredicate, Comma> { | |
| if let Some(WhereClause { predicates, .. }) = &item_fn.sig.generics.where_clause { | |
| predicates.clone() | |
| } else { | |
| parse_quote!() | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment