Skip to content

Commit dcfade4

Browse files
committed
fix: make never mutated local vars const
1 parent 07a682a commit dcfade4

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

src/Uri.zig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ fn parseWithOs(
2020
text: []const u8,
2121
comptime is_windows: bool,
2222
) (std.Uri.ParseError || error{OutOfMemory})!Uri {
23-
var uri: std.Uri = try .parse(text);
23+
const uri: std.Uri = try .parse(text);
2424

2525
const capacity = capacity: {
2626
var capacity: usize = 0;

src/configuration.zig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -697,7 +697,7 @@ comptime {
697697

698698
/// The same struct as `Config` but every field is optional.
699699
pub const UnresolvedConfig = blk: {
700-
var struct_info: std.builtin.Type.Struct = @typeInfo(Config).@"struct";
700+
const struct_info: std.builtin.Type.Struct = @typeInfo(Config).@"struct";
701701
var field_types: [struct_info.fields.len]type = undefined;
702702
var field_attrs: [struct_info.fields.len]std.builtin.Type.StructField.Attributes = undefined;
703703
for (&field_types, &field_attrs, struct_info.fields) |*ty, *attr, field| {

0 commit comments

Comments
 (0)