tiehuis / zig-regex

A regex implementation for the zig programming language
MIT License
196 stars 24 forks source link

fix new const errors on master #28

Closed tiehuis closed 10 months ago

tiehuis commented 10 months ago

This should be able to be done in a way compatible with 0.11.0.

src/c_regex.zig:20:9: error: local variable is never mutated
    var r = allocator.create(Regex) catch return null;
        ^
src/c_regex.zig:20:9: note: consider using 'const'
src/c_regex.zig:43:9: error: local variable is never mutated
    var c = allocator.create(Captures) catch return null;
        ^
tiehuis commented 10 months ago

See https://github.com/tiehuis/zig-regex/commit/06ff45130ee7afe17e269b59b36148c8ffc99d44.