diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2021-02-24 15:08:23 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2021-02-24 15:08:23 -0700 |
| commit | 8e6c2b7a47c3c19269cf03075eaeddb7ee61c42d (patch) | |
| tree | 6fca0ca2a2929fe9fbb66dc960451d77cefb04bc /lib/std/math/big | |
| parent | 38441b5eab3c9371f8412aa46a277f37fc026a79 (diff) | |
| parent | 8b9434871ea437840d25f073b945466359f402f9 (diff) | |
| download | zig-8e6c2b7a47c3c19269cf03075eaeddb7ee61c42d.tar.gz zig-8e6c2b7a47c3c19269cf03075eaeddb7ee61c42d.zip | |
Merge remote-tracking branch 'origin/master' into ast-memory-layout
Diffstat (limited to 'lib/std/math/big')
| -rw-r--r-- | lib/std/math/big/int.zig | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/std/math/big/int.zig b/lib/std/math/big/int.zig index 81982eac51..d1d7b33508 100644 --- a/lib/std/math/big/int.zig +++ b/lib/std/math/big/int.zig @@ -607,7 +607,7 @@ pub const Mutable = struct { /// it will have the same length as it had when the function was called. pub fn gcd(rma: *Mutable, x: Const, y: Const, limbs_buffer: *std.ArrayList(Limb)) !void { const prev_len = limbs_buffer.items.len; - defer limbs_buffer.shrinkAndFree(prev_len); + defer limbs_buffer.shrinkRetainingCapacity(prev_len); const x_copy = if (rma.limbs.ptr == x.limbs.ptr) blk: { const start = limbs_buffer.items.len; try limbs_buffer.appendSlice(x.limbs); |
