From b61e53cc40869504ea75fcfd90379f7d3048b82d Mon Sep 17 00:00:00 2001 From: daurnimator Date: Fri, 14 Feb 2020 18:59:07 +1100 Subject: std: bigint.deinit() shouldn't need a mutable pointer --- lib/std/math/big/int.zig | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'lib') diff --git a/lib/std/math/big/int.zig b/lib/std/math/big/int.zig index 7d8d3a195b..e85e8d292d 100644 --- a/lib/std/math/big/int.zig +++ b/lib/std/math/big/int.zig @@ -137,10 +137,9 @@ pub const Int = struct { } /// Frees all memory associated with an Int. - pub fn deinit(self: *Int) void { + pub fn deinit(self: Int) void { self.assertWritable(); self.allocator.?.free(self.limbs); - self.* = undefined; } /// Clones an Int and returns a new Int with the same value. The new Int is a deep copy and -- cgit v1.2.3