@@ -43,7 +43,7 @@ test "pathWithExtension" {
43
43
try std .testing .expectEqualStrings ("mem.exe" , example );
44
44
}
45
45
46
- pub fn main () anyerror ! void {
46
+ pub fn main () ! void {
47
47
var arena = std .heap .ArenaAllocator .init (std .heap .page_allocator );
48
48
defer arena .deinit ();
49
49
const allocator = arena .allocator ();
@@ -67,7 +67,7 @@ pub fn main() anyerror!void {
67
67
var buffered_reader = std .io .bufferedReader (shim_file .reader ());
68
68
const reader = buffered_reader .reader ();
69
69
70
- try readShim (reader , & cfg );
70
+ try readShim (reader . any () , & cfg );
71
71
}
72
72
73
73
// Arguments sent to the child process
@@ -109,7 +109,7 @@ const whitespace_with_quotes = std.ascii.whitespace ++ .{'"'};
109
109
///
110
110
/// The file is (usually) multiple key-value pairs separated by a single '=', and
111
111
/// must contain at least a "path", although this is up to the caller to uphold.
112
- fn readShim (reader : anytype , into : * std.BufMap ) ! void {
112
+ fn readShim (reader : std.io.AnyReader , into : * std.BufMap ) ! void {
113
113
// Go through the shim file and collect key-value pairs
114
114
var line_buf : [1024 ]u8 = undefined ;
115
115
while (try reader .readUntilDelimiterOrEof (& line_buf , '\n ' )) | line | {
@@ -131,7 +131,7 @@ test "parsing valid shim" {
131
131
var cfg = std .BufMap .init (std .testing .allocator );
132
132
defer cfg .deinit ();
133
133
134
- _ = try readShim (reader , & cfg );
134
+ _ = try readShim (reader . any () , & cfg );
135
135
136
136
try std .testing .expectEqualStrings ("C:/Program Files/Git/cmd/git.exe" , cfg .get ("path" ) orelse "" );
137
137
try std .testing .expectEqualStrings ("status" , cfg .get ("args" ) orelse "" );
@@ -147,7 +147,7 @@ test "parsing valid shim (new style)" {
147
147
var cfg = std .BufMap .init (std .testing .allocator );
148
148
defer cfg .deinit ();
149
149
150
- _ = try readShim (reader , & cfg );
150
+ _ = try readShim (reader . any () , & cfg );
151
151
152
152
try std .testing .expectEqualStrings ("C:\\ Program Files\\ Git\\ cmd\\ git.exe" , cfg .get ("path" ) orelse "" );
153
153
try std .testing .expectEqualStrings ("status" , cfg .get ("args" ) orelse "" );
0 commit comments