Skip to content

Commit a61f415

Browse files
refactor: chain can be massive so make it mutable
1 parent d0f5a89 commit a61f415

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/rewriters.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,9 @@ end
6060

6161
If(f, x) = IfElse(f, x, Empty())
6262

63-
struct Chain{Cs}
64-
rws::Cs
65-
stop_on_match::Bool
63+
mutable struct Chain{Cs}
64+
const rws::Cs
65+
const stop_on_match::Bool
6666
end
6767
Chain(rws) = Chain(rws, false)
6868

@@ -138,7 +138,7 @@ instrument(x::Fixpoint, f) = Fixpoint(instrument(x.rw, f))
138138
function (rw::Fixpoint)(x)
139139
f = rw.rw
140140
y = f(x)
141-
while x !== y && !isequal(x, y)
141+
while (x !== y) && !isequal(x, y)
142142
y === nothing && return x
143143
x = y
144144
y = f(x)

0 commit comments

Comments
 (0)