Skip to content

Commit f728352

Browse files
committed
Some more cleanup
1 parent b21a19b commit f728352

2 files changed

Lines changed: 3 additions & 7 deletions

File tree

src/finitestatemachines/macro.jl

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,9 @@ macro stateful(expr::Expr)
3737
$((:($arg) for arg in new_expr.args)...)
3838
end
3939
)
40-
if expr.args[1].head == Symbol("::")
41-
func_expr.args[1] = Expr(Symbol("::"), func_expr.args[1], expr.args[1].args[2])
42-
end
40+
expr.args[1].head == Symbol("::") && func_expr.args[1] = Expr(Symbol("::"), func_expr.args[1], expr.args[1].args[2])
4341
call_expr = deepcopy(expr)
44-
if call_expr.args[1].head == Symbol("::")
45-
call_expr.args[1] = call_expr.args[1].args[1]
46-
end
42+
call_expr.args[1].head == Symbol("::") && call_expr.args[1] = call_expr.args[1].args[1]
4743
call_expr.head = Symbol("=")
4844
call_expr.args[2] = :($type_name($((:($arg) for arg in args)...)))
4945
esc(quote

src/tasks/base.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ function produce(v)
55
Base.schedule_and_wait(consumer, v)
66
return consumer.result
77
end
8-
produce(v...) = produce(v)
8+
#produce(v...) = produce(v)
99

1010
function consume(producer::Task, values...)
1111
istaskdone(producer) && return producer.value

0 commit comments

Comments
 (0)