diff options
| author | abhirag <hey@abhirag.com> | 2023-12-01 21:17:56 +0530 |
|---|---|---|
| committer | abhirag <hey@abhirag.com> | 2023-12-01 21:17:56 +0530 |
| commit | 577e06bbb40edbe2158bf1ccba6da39d5011babb (patch) | |
| tree | f44b53840b7ba790aae3f2d23045d6fdd7b70a70 /bindgen/gen_zig.py | |
| parent | db4fde91442cf18fa687a41c01f2376c1d2e6666 (diff) | |
Using const for local variables that are never mutated
Diffstat (limited to 'bindgen/gen_zig.py')
| -rw-r--r-- | bindgen/gen_zig.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/bindgen/gen_zig.py b/bindgen/gen_zig.py index cef75e9e..d66630f4 100644 --- a/bindgen/gen_zig.py +++ b/bindgen/gen_zig.py @@ -497,7 +497,7 @@ def gen_helpers(inp): l('};') l('// std.fmt-style formatted print') l('pub fn print(comptime fmt: anytype, args: anytype) void {') - l(' var writer: Writer = .{};') + l(' const writer: Writer = .{};') l(' @import("std").fmt.format(writer, fmt, args) catch {};') l('}') l('') |