mirror of
https://github.com/ziglang/zig.git
synced 2026-02-12 20:37:54 +00:00
std.math.big.int: update Managed.toString() to use provided allocator (#11839)
This commit is contained in:
parent
7c660d17cd
commit
47c4d44502
@ -2593,9 +2593,8 @@ pub const Managed = struct {
|
||||
/// Converts self to a string in the requested base. Memory is allocated from the provided
|
||||
/// allocator and not the one present in self.
|
||||
pub fn toString(self: Managed, allocator: Allocator, base: u8, case: std.fmt.Case) ![]u8 {
|
||||
_ = allocator;
|
||||
if (base < 2 or base > 16) return error.InvalidBase;
|
||||
return self.toConst().toStringAlloc(self.allocator, base, case);
|
||||
return self.toConst().toStringAlloc(allocator, base, case);
|
||||
}
|
||||
|
||||
/// To allow `std.fmt.format` to work with `Managed`.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user