From c70832bc411388c3e9749013d7cf99704ff95a36 Mon Sep 17 00:00:00 2001 From: Benjamin Graf Date: Sat, 13 Feb 2021 20:24:52 +0100 Subject: replace ArrayList.shrinkAndFree by ArrayList.shrinkRetainingCapacity --- lib/std/math/big/int.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/std/math') 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); -- cgit v1.2.3