Commit b61e53cc40

daurnimator <quae@daurnimator.com>
2020-02-14 08:59:07
std: bigint.deinit() shouldn't need a mutable pointer
1 parent fb6b94f
Changed files (1)
lib
std
math
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