Closed shiena closed 4 months ago
Fixed this one in https://github.com/Sobeston/zig.guide/commit/51f80b5fc8f25aec2a470109ee3826ce1d8281da Thanks for the report, trying to fix the others now
@Sobeston Thanks for the correction. The following other code also causes the same compile error.
Thanks again for the detailed report! Fixed in:
Since zig 0.12.0 there are several codes that give the local variable is never mutated error. For example
https://github.com/Sobeston/zig.guide/blob/master/website/versioned_docs/version-0.12/01-language-basics/23-optionals.md
But don't worry. This can be avoided by using a code like
_ = &a;
as described by the PRs author. https://github.com/ziglang/zig/pull/18017