Skip to content

Commit 783a2ee

Browse files
committed
ConfigHeader: zig fmt
1 parent 5615866 commit 783a2ee

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

lib/std/Build/Step/ConfigHeader.zig

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -511,7 +511,6 @@ fn render_cmake(
511511
}
512512
}
513513

514-
515514
fn render_meson(
516515
step: *Step,
517516
contents: []const u8,
@@ -924,8 +923,7 @@ fn expand_variables_meson(
924923
buffer: *std.ArrayList(u8),
925924
contents: []const u8,
926925
values: std.StringArrayHashMap(Value),
927-
) error{MissingValue,InvalidCharacter,OutOfMemory}![]const u8 {
928-
926+
) error{ MissingValue, InvalidCharacter, OutOfMemory }![]const u8 {
929927
const valid_varname_chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789/_.+-";
930928

931929
var prev: usize = 0;
@@ -934,7 +932,7 @@ fn expand_variables_meson(
934932
// find an unescaped @
935933
while (true) {
936934
const escapes = countEscapes(contents[0..current]);
937-
try buffer.appendSlice(contents[prev..current - escapes]);
935+
try buffer.appendSlice(contents[prev .. current - escapes]);
938936
try buffer.appendNTimes('\\', escapes / 2);
939937

940938
// candidate for expansion
@@ -955,7 +953,7 @@ fn expand_variables_meson(
955953
if (contents[valid_varname_end] != '@') {
956954
// return the failed expansion
957955
buffer.clearRetainingCapacity();
958-
try buffer.appendSlice(contents[current..valid_varname_end+1]);
956+
try buffer.appendSlice(contents[current .. valid_varname_end + 1]);
959957
return error.InvalidCharacter;
960958
}
961959

@@ -967,7 +965,7 @@ fn expand_variables_meson(
967965
continue;
968966
}
969967

970-
const key = contents[current+1..valid_varname_end];
968+
const key = contents[current + 1 .. valid_varname_end];
971969
const value = values.get(key) orelse {
972970
// return the key which is missing a value
973971
buffer.clearRetainingCapacity();
@@ -992,7 +990,7 @@ fn expand_variables_meson(
992990
current = std.mem.indexOfScalarPos(u8, contents, current + 1, '@') orelse break;
993991
}
994992

995-
try buffer.appendSlice(contents[current + 1..]);
993+
try buffer.appendSlice(contents[current + 1 ..]);
996994
return buffer.items;
997995
}
998996

0 commit comments

Comments
 (0)