authorgravatar for mikael@lilotux.netMikael Berthe <mikael@lilotux.net> 2022-06-13 17:19:37+02:00
committergravatar for noreply@github.comGitHub <noreply@github.com> 2022-06-13 17:19:37+02:00
log47c4d4450281bfddebf89cbad4f9c1fdcc7b0b65
treeba45c454908302bab89e4d632166f5c90ca3a58a
parent7c660d17cde9af6b4c7229a300ff0ccd31317bf3
signaturebadge-question-mark Signed by PGP key 4AEE18F83AFDEB23

std.math.big.int: update Managed.toString() to use provided allocator (#11839)


1 files changed, 1 insertions(+), 2 deletions(-)

lib/std/math/big/int.zig+1-2
......@@ -2593,9 +2593,8 @@ pub const Managed = struct {
25932593 /// Converts self to a string in the requested base. Memory is allocated from the provided
25942594 /// allocator and not the one present in self.
25952595 pub fn toString(self: Managed, allocator: Allocator, base: u8, case: std.fmt.Case) ![]u8 {
2596 _ = allocator;
25972596 if (base < 2 or base > 16) return error.InvalidBase;
2598 return self.toConst().toStringAlloc(self.allocator, base, case);
2597 return self.toConst().toStringAlloc(allocator, base, case);
25992598 }
26002599
26012600 /// To allow `std.fmt.format` to work with `Managed`.