dantecatalfamo / zig-dns

Experimental DNS library implemented in zig

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Variables are not changed

bortzmeyer opened this issue · comments

The very last Zig now rejects var is the value is never changed. This creates issues with zig-dns:

src/iterative.zig:71:9: error: local variable is never mutated
    var message_bytes = try message.to_bytes(allocator);
        ^~~~~~~~~~~~~
src/iterative.zig:71:9: note: consider using 'const'
src/main.zig:35:9: error: local variable is never mutated
    var message_bytes = try message.to_bytes(allocator);
        ^~~~~~~~~~~~~
src/main.zig:35:9: note: consider using 'const'

Thanks for the issue. I have to tackle a couple of issues with the latest zig master. They also changed the reader/writer interfaces and some built-in enum values.