how to migrate from visit_mut_with to Pass?
I'm upgrading the swc dependency for the qwik optimizer (https://github.com/QwikDev/qwik/blob/2ed63b78bd4a20b0f96b4e6fba9ae396916f2321/packages/qwik/src/optimizer/core/src/parse.rs#L266) and it looks like I need to convert
to
but then further down I get
use of moved value
for program
Furthermore, we use simplifier
on Module
but that latter doesn't have apply
Any help or pointers would be greatly appreciated.GitHub
qwik/packages/qwik/src/optimizer/core/src/parse.rs at 2ed63b78bd4a2...
Instant-loading web apps, without effort. Contribute to QwikDev/qwik development by creating an account on GitHub.
2 Replies
You can use program.mutate
For module, you can still use ‘visit_mut’. Alternatively you can construct Program by doing Program::Module(m) and doing expect_module
that worked, thank you very much @kdy1 !
https://github.com/QwikDev/qwik/pull/7108/files#diff-06833470209cc7a65129df714c87d8de87c2ef2a0a13226187153ec7b9f40ba4