aboutsummaryrefslogtreecommitdiff
path: root/lib/std/debug.zig
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2019-11-30 15:14:04 -0500
committerAndrew Kelley <andrew@ziglang.org>2019-11-30 15:35:27 -0500
commit413f9a5cfc9e867e3bc69b47b38c62b52a52d5e9 (patch)
tree527b612cd0b7de432ed0738cf8c181a8f37dfb93 /lib/std/debug.zig
parentd039fed831cfc219821b58f1d819d79ad49dc652 (diff)
downloadzig-413f9a5cfc9e867e3bc69b47b38c62b52a52d5e9.tar.gz
zig-413f9a5cfc9e867e3bc69b47b38c62b52a52d5e9.zip
move `std.fs.Dir.cwd` to `std.fs.cwd`
update to non-deprecated std.fs APIs throughout the codebase Related: #3811
Diffstat (limited to 'lib/std/debug.zig')
-rw-r--r--lib/std/debug.zig4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/std/debug.zig b/lib/std/debug.zig
index 6324c88d86..3c842f3ac1 100644
--- a/lib/std/debug.zig
+++ b/lib/std/debug.zig
@@ -1131,7 +1131,7 @@ fn openSelfDebugInfoMacOs(allocator: *mem.Allocator) !DebugInfo {
}
fn printLineFromFileAnyOs(out_stream: var, line_info: LineInfo) !void {
- var f = try File.openRead(line_info.file_name);
+ var f = try fs.cwd().openFile(line_info.file_name, .{});
defer f.close();
// TODO fstat and make sure that the file has the correct size
@@ -2089,7 +2089,7 @@ fn getLineNumberInfoMacOs(di: *DebugInfo, symbol: MachoSymbol, target_address: u
const ofile_path = mem.toSliceConst(u8, @ptrCast([*:0]const u8, di.strings.ptr + ofile.n_strx));
gop.kv.value = MachOFile{
- .bytes = try std.fs.Dir.cwd().readFileAllocAligned(
+ .bytes = try std.fs.cwd().readFileAllocAligned(
di.ofiles.allocator,
ofile_path,
maxInt(usize),