Commit 5ab8db7b3e

Sahnvour <sahnvour@pm.me>
2019-01-12 20:13:06
removed unnecessary cast
1 parent 404c87b
Changed files (1)
std
debug
std/debug/index.zig
@@ -247,8 +247,7 @@ pub fn writeCurrentStackTraceWindows(
     start_addr: ?usize,
 ) !void {
     var addr_buf: [1024]usize = undefined;
-    const casted_len = @intCast(u32, addr_buf.len); // TODO shouldn't need this cast
-    const n = windows.RtlCaptureStackBackTrace(0, casted_len, @ptrCast(**c_void, &addr_buf), null);
+    const n = windows.RtlCaptureStackBackTrace(0, addr_buf.len, @ptrCast(**c_void, &addr_buf), null);
     const addrs = addr_buf[0..n];
     var start_i: usize = if (start_addr) |saddr| blk: {
         for (addrs) |addr, i| {