aboutsummaryrefslogtreecommitdiff
path: root/lib/std/math
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2022-11-27 01:07:35 -0700
committerAndrew Kelley <andrew@ziglang.org>2022-11-29 23:30:38 -0700
commitceb0a632cfd6a4eada6bd27bf6a3754e95dcac86 (patch)
tree3c174281ab0b9d51b6c78234b0648e197412eea8 /lib/std/math
parentdeda6b514691c3a7ffc7931469886d0e7be2f67e (diff)
downloadzig-ceb0a632cfd6a4eada6bd27bf6a3754e95dcac86.tar.gz
zig-ceb0a632cfd6a4eada6bd27bf6a3754e95dcac86.zip
std.mem.Allocator: allow shrink to fail
closes #13535
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 9cf31ab6c4..9d0228db4b 100644
--- a/lib/std/math/big/int.zig
+++ b/lib/std/math/big/int.zig
@@ -2148,7 +2148,7 @@ pub const Const = struct {
const limbs = try allocator.alloc(Limb, calcToStringLimbsBufferLen(self.limbs.len, base));
defer allocator.free(limbs);
- return allocator.shrink(string, self.toString(string, base, case, limbs));
+ return allocator.realloc(string, self.toString(string, base, case, limbs));
}
/// Converts self to a string in the requested base.