std.io.GenericReader: add missing error annotations

This commit is contained in:
Jacob Young
2024-01-12 21:33:22 +01:00
committed by Andrew Kelley
parent 4f2009de12
commit 7916cf6f83

View File

@@ -142,7 +142,7 @@ pub fn GenericReader(
self: Self,
array_list: *std.ArrayList(u8),
max_append_size: usize,
) (error{StreamTooLong} || Error)!void {
) (error{StreamTooLong} || Allocator.Error || Error)!void {
return @errorCast(self.any().readAllArrayList(array_list, max_append_size));
}
@@ -151,7 +151,7 @@ pub fn GenericReader(
comptime alignment: ?u29,
array_list: *std.ArrayListAligned(u8, alignment),
max_append_size: usize,
) (error{StreamTooLong} || Error)!void {
) (error{StreamTooLong} || Allocator.Error || Error)!void {
return @errorCast(self.any().readAllArrayListAligned(
alignment,
array_list,
@@ -163,7 +163,7 @@ pub fn GenericReader(
self: Self,
allocator: Allocator,
max_size: usize,
) (Error || error{StreamTooLong})![]u8 {
) (Error || Allocator.Error || error{StreamTooLong})![]u8 {
return @errorCast(self.any().readAllAlloc(allocator, max_size));
}
@@ -172,7 +172,7 @@ pub fn GenericReader(
array_list: *std.ArrayList(u8),
delimiter: u8,
max_size: usize,
) (NoEofError || error{StreamTooLong})!void {
) (NoEofError || Allocator.Error || error{StreamTooLong})!void {
return @errorCast(self.any().readUntilDelimiterArrayList(
array_list,
delimiter,
@@ -185,7 +185,7 @@ pub fn GenericReader(
allocator: Allocator,
delimiter: u8,
max_size: usize,
) (NoEofError || error{StreamTooLong})![]u8 {
) (NoEofError || Allocator.Error || error{StreamTooLong})![]u8 {
return @errorCast(self.any().readUntilDelimiterAlloc(
allocator,
delimiter,
@@ -206,7 +206,7 @@ pub fn GenericReader(
allocator: Allocator,
delimiter: u8,
max_size: usize,
) (Error || error{StreamTooLong})!?[]u8 {
) (Error || Allocator.Error || error{StreamTooLong})!?[]u8 {
return @errorCast(self.any().readUntilDelimiterOrEofAlloc(
allocator,
delimiter,