authorgravatar for jacobly@ziglang.orgJacob Young <jacobly@ziglang.org> 2024-01-12 21:33:22+01:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2024-01-13 13:16:51-08:00
log7916cf6f83650517f39a9e6aec23ba53d176a2ba
treed3f64a493f3f69443d768018ec56855fee638322
parent4f2009de12275d1633ae514dc00b795a3fa103a5

std.io.GenericReader: add missing error annotations


1 files changed, 6 insertions(+), 6 deletions(-)

lib/std/io.zig+6-6
...@@ -142,7 +142,7 @@ pub fn GenericReader(...@@ -142,7 +142,7 @@ pub fn GenericReader(
142 self: Self,142 self: Self,
143 array_list: *std.ArrayList(u8),143 array_list: *std.ArrayList(u8),
144 max_append_size: usize,144 max_append_size: usize,
145 ) (error{StreamTooLong} || Error)!void {145 ) (error{StreamTooLong} || Allocator.Error || Error)!void {
146 return @errorCast(self.any().readAllArrayList(array_list, max_append_size));146 return @errorCast(self.any().readAllArrayList(array_list, max_append_size));
147 }147 }
148148
...@@ -151,7 +151,7 @@ pub fn GenericReader(...@@ -151,7 +151,7 @@ pub fn GenericReader(
151 comptime alignment: ?u29,151 comptime alignment: ?u29,
152 array_list: *std.ArrayListAligned(u8, alignment),152 array_list: *std.ArrayListAligned(u8, alignment),
153 max_append_size: usize,153 max_append_size: usize,
154 ) (error{StreamTooLong} || Error)!void {154 ) (error{StreamTooLong} || Allocator.Error || Error)!void {
155 return @errorCast(self.any().readAllArrayListAligned(155 return @errorCast(self.any().readAllArrayListAligned(
156 alignment,156 alignment,
157 array_list,157 array_list,
...@@ -163,7 +163,7 @@ pub fn GenericReader(...@@ -163,7 +163,7 @@ pub fn GenericReader(
163 self: Self,163 self: Self,
164 allocator: Allocator,164 allocator: Allocator,
165 max_size: usize,165 max_size: usize,
166 ) (Error || error{StreamTooLong})![]u8 {166 ) (Error || Allocator.Error || error{StreamTooLong})![]u8 {
167 return @errorCast(self.any().readAllAlloc(allocator, max_size));167 return @errorCast(self.any().readAllAlloc(allocator, max_size));
168 }168 }
169169
...@@ -172,7 +172,7 @@ pub fn GenericReader(...@@ -172,7 +172,7 @@ pub fn GenericReader(
172 array_list: *std.ArrayList(u8),172 array_list: *std.ArrayList(u8),
173 delimiter: u8,173 delimiter: u8,
174 max_size: usize,174 max_size: usize,
175 ) (NoEofError || error{StreamTooLong})!void {175 ) (NoEofError || Allocator.Error || error{StreamTooLong})!void {
176 return @errorCast(self.any().readUntilDelimiterArrayList(176 return @errorCast(self.any().readUntilDelimiterArrayList(
177 array_list,177 array_list,
178 delimiter,178 delimiter,
...@@ -185,7 +185,7 @@ pub fn GenericReader(...@@ -185,7 +185,7 @@ pub fn GenericReader(
185 allocator: Allocator,185 allocator: Allocator,
186 delimiter: u8,186 delimiter: u8,
187 max_size: usize,187 max_size: usize,
188 ) (NoEofError || error{StreamTooLong})![]u8 {188 ) (NoEofError || Allocator.Error || error{StreamTooLong})![]u8 {
189 return @errorCast(self.any().readUntilDelimiterAlloc(189 return @errorCast(self.any().readUntilDelimiterAlloc(
190 allocator,190 allocator,
191 delimiter,191 delimiter,
...@@ -206,7 +206,7 @@ pub fn GenericReader(...@@ -206,7 +206,7 @@ pub fn GenericReader(
206 allocator: Allocator,206 allocator: Allocator,
207 delimiter: u8,207 delimiter: u8,
208 max_size: usize,208 max_size: usize,
209 ) (Error || error{StreamTooLong})!?[]u8 {209 ) (Error || Allocator.Error || error{StreamTooLong})!?[]u8 {
210 return @errorCast(self.any().readUntilDelimiterOrEofAlloc(210 return @errorCast(self.any().readUntilDelimiterOrEofAlloc(
211 allocator,211 allocator,
212 delimiter,212 delimiter,