Skip to content
This repository was archived by the owner on Apr 9, 2025. It is now read-only.

Commit cc38625

Browse files
committed
Zig 0.14 compatibility
1 parent 9f2e42b commit cc38625

File tree

5 files changed

+28
-27
lines changed

5 files changed

+28
-27
lines changed

.github/workflows/zig-fmt.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: zig-fmt
22

33
env:
4-
ZIG_VERSION: 0.13.0
4+
ZIG_VERSION: 0.14.0
55

66
on:
77
pull_request:

.github/workflows/zig-test.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: zig-test
22

33
env:
4-
ZIG_VERSION: 0.14.0-dev.3239+d7b93c787
4+
ZIG_VERSION: 0.14.0
55

66
on:
77
push:

build.zig.zon

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
.{
2-
.name = "zig-async-io",
2+
.name = .zig_async_io,
33
.version = "0.1.0",
44
.minimum_zig_version = "0.14.0",
5+
.fingerprint = 0xec4ef418b22755ea,
56
.paths = .{
67
"build.zig",
78
"build.zig.zon",

src/std/http/Client.zig

+12-12
Original file line numberDiff line numberDiff line change
@@ -1122,13 +1122,13 @@ pub const Request = struct {
11221122
pub const WaitError = RequestError || SendError || TransferReadError ||
11231123
proto.HeadersParser.CheckCompleteHeadError || Response.ParseError ||
11241124
error{ // TODO: file zig fmt issue for this bad indentation
1125-
TooManyHttpRedirects,
1126-
RedirectRequiresResend,
1127-
HttpRedirectLocationMissing,
1128-
HttpRedirectLocationInvalid,
1129-
CompressionInitializationFailed,
1130-
CompressionUnsupported,
1131-
};
1125+
TooManyHttpRedirects,
1126+
RedirectRequiresResend,
1127+
HttpRedirectLocationMissing,
1128+
HttpRedirectLocationInvalid,
1129+
CompressionInitializationFailed,
1130+
CompressionUnsupported,
1131+
};
11321132

11331133
pub fn async_wait(_: *Request, ctx: *Ctx, comptime cbk: Cbk) !void {
11341134
try ctx.push(cbk);
@@ -1997,12 +1997,12 @@ pub fn async_connect(
19971997
pub const RequestError = ConnectTcpError || ConnectErrorPartial || Request.SendError ||
19981998
std.fmt.ParseIntError || Connection.WriteError ||
19991999
error{ // TODO: file a zig fmt issue for this bad indentation
2000-
UnsupportedUriScheme,
2001-
UriMissingHost,
2000+
UnsupportedUriScheme,
2001+
UriMissingHost,
20022002

2003-
CertificateBundleLoadFailure,
2004-
UnsupportedTransferEncoding,
2005-
};
2003+
CertificateBundleLoadFailure,
2004+
UnsupportedTransferEncoding,
2005+
};
20062006

20072007
pub const RequestOptions = struct {
20082008
version: http.Version = .@"HTTP/1.1",

src/tls.zig/connection.zig

+12-12
Original file line numberDiff line numberDiff line change
@@ -135,20 +135,20 @@ pub fn Connection(comptime Stream: type) type {
135135

136136
pub const ReadError = Stream.ReadError || proto.Alert.Error ||
137137
error{
138-
TlsBadVersion,
139-
TlsUnexpectedMessage,
140-
TlsRecordOverflow,
141-
TlsDecryptError,
142-
TlsDecodeError,
143-
TlsBadRecordMac,
144-
TlsIllegalParameter,
145-
BufferOverflow,
146-
};
138+
TlsBadVersion,
139+
TlsUnexpectedMessage,
140+
TlsRecordOverflow,
141+
TlsDecryptError,
142+
TlsDecodeError,
143+
TlsBadRecordMac,
144+
TlsIllegalParameter,
145+
BufferOverflow,
146+
};
147147
pub const WriteError = Stream.WriteError ||
148148
error{
149-
BufferOverflow,
150-
TlsUnexpectedMessage,
151-
};
149+
BufferOverflow,
150+
TlsUnexpectedMessage,
151+
};
152152

153153
pub const Reader = std.io.Reader(*Self, ReadError, read);
154154
pub const Writer = std.io.Writer(*Self, WriteError, write);

0 commit comments

Comments
 (0)