diff options
| author | Benjamin Graf <bgraf@posteo.de> | 2021-02-13 20:24:52 +0100 |
|---|---|---|
| committer | Veikka Tuominen <git@vexu.eu> | 2021-02-21 11:56:14 +0200 |
| commit | c70832bc411388c3e9749013d7cf99704ff95a36 (patch) | |
| tree | 3cc6c632b9b784958ef39ff01606de5350754fe9 /lib/std/math/big | |
| parent | a448210fcf9a4c6671ed1073af1d3742600975b2 (diff) | |
| download | zig-c70832bc411388c3e9749013d7cf99704ff95a36.tar.gz zig-c70832bc411388c3e9749013d7cf99704ff95a36.zip | |
replace ArrayList.shrinkAndFree by ArrayList.shrinkRetainingCapacity
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); |
