mirror of
https://github.com/ziglang/zig.git
synced 2025-12-30 18:13:19 +00:00
std: bigint.deinit() shouldn't need a mutable pointer
This commit is contained in:
parent
fb6b94f80f
commit
b61e53cc40
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user