aboutsummaryrefslogtreecommitdiff
path: root/lib/std/math
diff options
context:
space:
mode:
Diffstat (limited to 'lib/std/math')
-rw-r--r--lib/std/math/big/int.zig2
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);