zig

fork of https://codeberg.org/ziglang/zig
Log | Files | Refs | README | LICENSE

commit b61e53cc40869504ea75fcfd90379f7d3048b82d (tree)
parent fb6b94f80fed42b4c690b43a875bf0a58977493e
Author: daurnimator <quae@daurnimator.com>
Date:   Fri, 14 Feb 2020 18:59:07 +1100

std: bigint.deinit() shouldn't need a mutable pointer

Diffstat:
Mlib/std/math/big/int.zig | 3+--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git 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