| ... | @@ -5294,7 +5294,7 @@ pub fn getOrPutStringFmt( | ... | @@ -5294,7 +5294,7 @@ pub fn getOrPutStringFmt( |
| 5294 | args: anytype, | 5294 | args: anytype, |
| 5295 | ) Allocator.Error!NullTerminatedString { | 5295 | ) Allocator.Error!NullTerminatedString { |
| 5296 | // ensure that references to string_bytes in args do not get invalidated | 5296 | // ensure that references to string_bytes in args do not get invalidated |
| 5297 | const len = std.fmt.count(format, args) + 1; | 5297 | const len = @intCast(usize, std.fmt.count(format, args) + 1); |
| 5298 | try ip.string_bytes.ensureUnusedCapacity(gpa, len); | 5298 | try ip.string_bytes.ensureUnusedCapacity(gpa, len); |
| 5299 | ip.string_bytes.writer(undefined).print(format, args) catch unreachable; | 5299 | ip.string_bytes.writer(undefined).print(format, args) catch unreachable; |
| 5300 | ip.string_bytes.appendAssumeCapacity(0); | 5300 | ip.string_bytes.appendAssumeCapacity(0); |