Skip to content

Commit

Permalink
remove hack cuz the bug is fixed by rust-itertools/itertools#835
Browse files Browse the repository at this point in the history
Signed-off-by: Richard Chien <[email protected]>
  • Loading branch information
stdrc committed Sep 30, 2024
1 parent fc24da4 commit 81b9235
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions src/expr/macro/src/gen.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,15 +61,8 @@ impl FunctionAttr {
}
let args = self.args.iter().map(|ty| types::expand_type_wildcard(ty));
let ret = types::expand_type_wildcard(&self.ret);
// multi_cartesian_product should emit an empty set if the input is empty.
let args_cartesian_product =
args.multi_cartesian_product()
.chain(match self.args.is_empty() {
true => vec![vec![]],
false => vec![],
});
let mut attrs = Vec::new();
for (args, mut ret) in args_cartesian_product.cartesian_product(ret) {
for (args, mut ret) in args.multi_cartesian_product().cartesian_product(ret) {
if ret == "auto" {
ret = types::min_compatible_type(&args);
}
Expand Down

0 comments on commit 81b9235

Please sign in to comment.