diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2025-02-22 17:03:24 -0800 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2025-02-22 17:09:20 -0800 |
| commit | eb3c7f570601a6e00cbf03f0a026b3493887a534 (patch) | |
| tree | e621eb6aa4ab49bb72018d33c373b258f55922df /lib/std | |
| parent | c0c911bfa78ea2968cd110ad64a4ba0d70ca93e5 (diff) | |
| download | zig-eb3c7f570601a6e00cbf03f0a026b3493887a534.tar.gz zig-eb3c7f570601a6e00cbf03f0a026b3493887a534.zip | |
zig build fmt
Diffstat (limited to 'lib/std')
| -rw-r--r-- | lib/std/Target.zig | 2 | ||||
| -rw-r--r-- | lib/std/c.zig | 8 | ||||
| -rw-r--r-- | lib/std/crypto/tls/Client.zig | 14 | ||||
| -rw-r--r-- | lib/std/debug/SelfInfo.zig | 18 | ||||
| -rw-r--r-- | lib/std/http/Client.zig | 24 | ||||
| -rw-r--r-- | lib/std/posix.zig | 12 | ||||
| -rw-r--r-- | lib/std/zig/render.zig | 8 |
7 files changed, 43 insertions, 43 deletions
diff --git a/lib/std/Target.zig b/lib/std/Target.zig index 740949858f..2f1d2d599d 100644 --- a/lib/std/Target.zig +++ b/lib/std/Target.zig @@ -299,7 +299,7 @@ pub const Os = struct { pub fn parse(str: []const u8) !WindowsVersion { return std.meta.stringToEnum(WindowsVersion, str) orelse @enumFromInt(std.fmt.parseInt(u32, str, 0) catch - return error.InvalidOperatingSystemVersion); + return error.InvalidOperatingSystemVersion); } /// This function is defined to serialize a Zig source code representation of this diff --git a/lib/std/c.zig b/lib/std/c.zig index 498e7d14ca..9b7d36cb32 100644 --- a/lib/std/c.zig +++ b/lib/std/c.zig @@ -9879,10 +9879,10 @@ pub extern "c" fn setlocale(category: LC, locale: ?[*:0]const u8) ?[*:0]const u8 pub const getcontext = if (builtin.target.abi.isAndroid() or builtin.target.os.tag == .openbsd) {} // android bionic and openbsd libc does not implement getcontext -else if (native_os == .linux and builtin.target.abi.isMusl()) - linux.getcontext -else - private.getcontext; + else if (native_os == .linux and builtin.target.abi.isMusl()) + linux.getcontext + else + private.getcontext; pub const max_align_t = if (native_abi == .msvc or native_abi == .itanium) f64 diff --git a/lib/std/crypto/tls/Client.zig b/lib/std/crypto/tls/Client.zig index 09e5e0fdd5..738fe122dd 100644 --- a/lib/std/crypto/tls/Client.zig +++ b/lib/std/crypto/tls/Client.zig @@ -692,7 +692,7 @@ pub fn init(stream: anytype, options: Options) InitError(@TypeOf(stream))!Client const client_key_exchange_msg = .{@intFromEnum(tls.ContentType.handshake)} ++ int(u16, @intFromEnum(tls.ProtocolVersion.tls_1_2)) ++ array(u16, u8, .{@intFromEnum(tls.HandshakeType.client_key_exchange)} ++ - array(u24, u8, array(u8, u8, key_share.secp256r1_kp.public_key.toUncompressedSec1()))); + array(u24, u8, array(u8, u8, key_share.secp256r1_kp.public_key.toUncompressedSec1()))); const client_change_cipher_spec_msg = .{@intFromEnum(tls.ContentType.change_cipher_spec)} ++ int(u16, @intFromEnum(tls.ProtocolVersion.tls_1_2)) ++ array(u16, tls.ChangeCipherSpecType, .{.change_cipher_spec}); @@ -720,11 +720,11 @@ pub fn init(stream: anytype, options: Options) InitError(@TypeOf(stream))!Client ); const client_verify_cleartext = .{@intFromEnum(tls.HandshakeType.finished)} ++ array(u24, u8, hmacExpandLabel( - P.Hmac, - &master_secret, - &.{ "client finished", &p.transcript_hash.peek() }, - P.verify_data_length, - )); + P.Hmac, + &master_secret, + &.{ "client finished", &p.transcript_hash.peek() }, + P.verify_data_length, + )); p.transcript_hash.update(&client_verify_cleartext); p.version = .{ .tls_1_2 = .{ .expected_server_verify_data = hmacExpandLabel( @@ -745,7 +745,7 @@ pub fn init(stream: anytype, options: Options) InitError(@TypeOf(stream))!Client var client_verify_msg = .{@intFromEnum(tls.ContentType.handshake)} ++ int(u16, @intFromEnum(tls.ProtocolVersion.tls_1_2)) ++ array(u16, u8, nonce[P.fixed_iv_length..].* ++ - @as([client_verify_cleartext.len + P.mac_length]u8, undefined)); + @as([client_verify_cleartext.len + P.mac_length]u8, undefined)); P.AEAD.encrypt( client_verify_msg[client_verify_msg.len - P.mac_length - client_verify_cleartext.len ..][0..client_verify_cleartext.len], diff --git a/lib/std/debug/SelfInfo.zig b/lib/std/debug/SelfInfo.zig index 0bd3f2d41b..ea7ecac4ed 100644 --- a/lib/std/debug/SelfInfo.zig +++ b/lib/std/debug/SelfInfo.zig @@ -689,15 +689,15 @@ pub const Module = switch (native_os) { const o_file_path = mem.sliceTo(self.strings[symbol.ofile..], 0); const o_file_info = self.ofiles.getPtr(o_file_path) orelse (self.loadOFile(allocator, o_file_path) catch |err| switch (err) { - error.FileNotFound, - error.MissingDebugInfo, - error.InvalidDebugInfo, - => return .{ - .relocated_address = relocated_address, - .symbol = symbol, - }, - else => return err, - }); + error.FileNotFound, + error.MissingDebugInfo, + error.InvalidDebugInfo, + => return .{ + .relocated_address = relocated_address, + .symbol = symbol, + }, + else => return err, + }); return .{ .relocated_address = relocated_address, diff --git a/lib/std/http/Client.zig b/lib/std/http/Client.zig index 3560e69b58..86f29b4a08 100644 --- a/lib/std/http/Client.zig +++ b/lib/std/http/Client.zig @@ -960,13 +960,13 @@ pub const Request = struct { pub const WaitError = RequestError || SendError || TransferReadError || proto.HeadersParser.CheckCompleteHeadError || Response.ParseError || error{ - TooManyHttpRedirects, - RedirectRequiresResend, - HttpRedirectLocationMissing, - HttpRedirectLocationInvalid, - CompressionInitializationFailed, - CompressionUnsupported, - }; + TooManyHttpRedirects, + RedirectRequiresResend, + HttpRedirectLocationMissing, + HttpRedirectLocationInvalid, + CompressionInitializationFailed, + CompressionUnsupported, + }; /// Waits for a response from the server and parses any headers that are sent. /// This function will block until the final response is received. @@ -1540,12 +1540,12 @@ pub fn connect( pub const RequestError = ConnectTcpError || ConnectErrorPartial || Request.SendError || std.fmt.ParseIntError || Connection.WriteError || error{ - UnsupportedUriScheme, - UriMissingHost, + UnsupportedUriScheme, + UriMissingHost, - CertificateBundleLoadFailure, - UnsupportedTransferEncoding, -}; + CertificateBundleLoadFailure, + UnsupportedTransferEncoding, + }; pub const RequestOptions = struct { version: http.Version = .@"HTTP/1.1", diff --git a/lib/std/posix.zig b/lib/std/posix.zig index 4dd93f719f..30cbcab6e9 100644 --- a/lib/std/posix.zig +++ b/lib/std/posix.zig @@ -2851,12 +2851,12 @@ pub fn renameatW( rc = windows.ntdll.NtSetInformationFile( - src_fd, - &io_status_block, - rename_info, - @intCast(struct_len), // already checked for error.NameTooLong - .FileRenameInformation, - ); + src_fd, + &io_status_block, + rename_info, + @intCast(struct_len), // already checked for error.NameTooLong + .FileRenameInformation, + ); } switch (rc) { diff --git a/lib/std/zig/render.zig b/lib/std/zig/render.zig index a24b5f5401..264a262a04 100644 --- a/lib/std/zig/render.zig +++ b/lib/std/zig/render.zig @@ -372,7 +372,7 @@ fn renderExpression(r: *Render, node: Ast.Node.Index, space: Space) Error!void { if (!ais.indentStackEmpty() and token_tags[i] != .colon and ((token_tags[i] != .semicolon and token_tags[i] != .comma) or - ais.lastSpaceModeIndent() < ais.currentIndent())) + ais.lastSpaceModeIndent() < ais.currentIndent())) { ais.popIndent(); try ais.pushIndent(.normal); @@ -1185,9 +1185,9 @@ fn renderVarDeclWithoutFixups( { const name_space = if (var_decl.ast.type_node == 0 and (var_decl.ast.align_node != 0 or - var_decl.ast.addrspace_node != 0 or - var_decl.ast.section_node != 0 or - var_decl.ast.init_node != 0)) + var_decl.ast.addrspace_node != 0 or + var_decl.ast.section_node != 0 or + var_decl.ast.init_node != 0)) Space.space else Space.none; |
