From 50339f595aa6ec96760b1cd9f8d0e0bfc3f167fc Mon Sep 17 00:00:00 2001 From: Eric Joldasov Date: Thu, 15 Jun 2023 13:14:16 +0600 Subject: all: zig fmt and rename "@XToY" to "@YFromX" Signed-off-by: Eric Joldasov --- lib/std/atomic/queue.zig | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib/std/atomic/queue.zig') diff --git a/lib/std/atomic/queue.zig b/lib/std/atomic/queue.zig index 7c9ffa2684..70cb293cf4 100644 --- a/lib/std/atomic/queue.zig +++ b/lib/std/atomic/queue.zig @@ -135,7 +135,7 @@ pub fn Queue(comptime T: type) type { ) !void { try s.writeByteNTimes(' ', indent); if (optional_node) |node| { - try s.print("0x{x}={}\n", .{ @ptrToInt(node), node.data }); + try s.print("0x{x}={}\n", .{ @intFromPtr(node), node.data }); if (depth == 0) { try s.print("(max depth)\n", .{}); return; @@ -387,7 +387,7 @@ test "std.atomic.Queue dump" { \\tail: 0x{x}=1 \\ (null) \\ - , .{ @ptrToInt(queue.head), @ptrToInt(queue.tail) }); + , .{ @intFromPtr(queue.head), @intFromPtr(queue.tail) }); try expect(mem.eql(u8, buffer[0..fbs.pos], expected)); // Test a stream with two elements @@ -408,6 +408,6 @@ test "std.atomic.Queue dump" { \\tail: 0x{x}=2 \\ (null) \\ - , .{ @ptrToInt(queue.head), @ptrToInt(queue.head.?.next), @ptrToInt(queue.tail) }); + , .{ @intFromPtr(queue.head), @intFromPtr(queue.head.?.next), @intFromPtr(queue.tail) }); try expect(mem.eql(u8, buffer[0..fbs.pos], expected)); } -- cgit v1.2.3