aboutsummaryrefslogtreecommitdiff
path: root/lib/std/crypto
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2025-12-06 17:23:07 -0800
committerAndrew Kelley <andrew@ziglang.org>2025-12-23 22:15:07 -0800
commit3204fb756980c19b7a95534acdd7a1bba837fbc3 (patch)
tree45b5525ead2923de83ea85eacca351da64d55c46 /lib/std/crypto
parent1b1fb7fab623e40f4ddc24d7b5ef7e48949e8a17 (diff)
downloadzig-3204fb756980c19b7a95534acdd7a1bba837fbc3.tar.gz
zig-3204fb756980c19b7a95534acdd7a1bba837fbc3.zip
update all occurrences of std.fs.File to std.Io.File
Diffstat (limited to 'lib/std/crypto')
-rw-r--r--lib/std/crypto/Certificate/Bundle.zig8
-rw-r--r--lib/std/crypto/Certificate/Bundle/macos.zig2
-rw-r--r--lib/std/crypto/benchmark.zig8
3 files changed, 10 insertions, 8 deletions
diff --git a/lib/std/crypto/Certificate/Bundle.zig b/lib/std/crypto/Certificate/Bundle.zig
index 9541e01db5..1d21918b5c 100644
--- a/lib/std/crypto/Certificate/Bundle.zig
+++ b/lib/std/crypto/Certificate/Bundle.zig
@@ -171,7 +171,7 @@ fn rescanWindows(cb: *Bundle, gpa: Allocator, io: Io, now: Io.Timestamp) RescanW
cb.bytes.shrinkAndFree(gpa, cb.bytes.items.len);
}
-pub const AddCertsFromDirPathError = fs.File.OpenError || AddCertsFromDirError;
+pub const AddCertsFromDirPathError = Io.File.OpenError || AddCertsFromDirError;
pub fn addCertsFromDirPath(
cb: *Bundle,
@@ -212,7 +212,7 @@ pub fn addCertsFromDir(cb: *Bundle, gpa: Allocator, io: Io, now: Io.Timestamp, i
}
}
-pub const AddCertsFromFilePathError = fs.File.OpenError || AddCertsFromFileError || Io.Clock.Error;
+pub const AddCertsFromFilePathError = Io.File.OpenError || AddCertsFromFileError || Io.Clock.Error;
pub fn addCertsFromFilePathAbsolute(
cb: *Bundle,
@@ -242,8 +242,8 @@ pub fn addCertsFromFilePath(
}
pub const AddCertsFromFileError = Allocator.Error ||
- fs.File.GetSeekPosError ||
- fs.File.ReadError ||
+ Io.File.GetSeekPosError ||
+ Io.File.ReadError ||
ParseCertError ||
std.base64.Error ||
error{ CertificateAuthorityBundleTooBig, MissingEndCertificateMarker, Streaming };
diff --git a/lib/std/crypto/Certificate/Bundle/macos.zig b/lib/std/crypto/Certificate/Bundle/macos.zig
index d32f1be8e0..473505ac51 100644
--- a/lib/std/crypto/Certificate/Bundle/macos.zig
+++ b/lib/std/crypto/Certificate/Bundle/macos.zig
@@ -6,7 +6,7 @@ const mem = std.mem;
const Allocator = std.mem.Allocator;
const Bundle = @import("../Bundle.zig");
-pub const RescanMacError = Allocator.Error || fs.File.OpenError || fs.File.ReadError || fs.File.SeekError || Bundle.ParseCertError || error{EndOfStream};
+pub const RescanMacError = Allocator.Error || Io.File.OpenError || Io.File.ReadError || Io.File.SeekError || Bundle.ParseCertError || error{EndOfStream};
pub fn rescanMac(cb: *Bundle, gpa: Allocator, io: Io, now: Io.Timestamp) RescanMacError!void {
cb.bytes.clearRetainingCapacity();
diff --git a/lib/std/crypto/benchmark.zig b/lib/std/crypto/benchmark.zig
index 54024f070e..1b71110be5 100644
--- a/lib/std/crypto/benchmark.zig
+++ b/lib/std/crypto/benchmark.zig
@@ -1,10 +1,12 @@
// zig run -O ReleaseFast --zig-lib-dir ../.. benchmark.zig
-const std = @import("std");
const builtin = @import("builtin");
+
+const std = @import("std");
+const Io = std.Io;
const mem = std.mem;
const time = std.time;
-const Timer = time.Timer;
+const Timer = std.time.Timer;
const crypto = std.crypto;
const KiB = 1024;
@@ -504,7 +506,7 @@ fn mode(comptime x: comptime_int) comptime_int {
pub fn main() !void {
// Size of buffer is about size of printed message.
var stdout_buffer: [0x100]u8 = undefined;
- var stdout_writer = std.fs.File.stdout().writer(&stdout_buffer);
+ var stdout_writer = Io.File.stdout().writer(&stdout_buffer);
const stdout = &stdout_writer.interface;
var arena = std.heap.ArenaAllocator.init(std.heap.page_allocator);