diff options
| author | mlugg <mlugg@mlugg.co.uk> | 2023-11-10 05:27:17 +0000 |
|---|---|---|
| committer | mlugg <mlugg@mlugg.co.uk> | 2023-11-19 09:55:07 +0000 |
| commit | 51595d6b75d8ac2443a2c142c71f2a617c12fe96 (patch) | |
| tree | 0e3045793aa36cc8569181cc790d270c4f056806 /lib/std/fmt/parse_float/parse.zig | |
| parent | baabc6013ea4f44082e69375214e76b5d803c5cb (diff) | |
| download | zig-51595d6b75d8ac2443a2c142c71f2a617c12fe96.tar.gz zig-51595d6b75d8ac2443a2c142c71f2a617c12fe96.zip | |
lib: correct unnecessary uses of 'var'
Diffstat (limited to 'lib/std/fmt/parse_float/parse.zig')
| -rw-r--r-- | lib/std/fmt/parse_float/parse.zig | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/std/fmt/parse_float/parse.zig b/lib/std/fmt/parse_float/parse.zig index a31df31312..841119aa02 100644 --- a/lib/std/fmt/parse_float/parse.zig +++ b/lib/std/fmt/parse_float/parse.zig @@ -105,7 +105,7 @@ fn parsePartialNumberBase(comptime T: type, stream: *FloatStream, negative: bool // parse initial digits before dot var mantissa: MantissaT = 0; tryParseDigits(MantissaT, stream, &mantissa, info.base); - var int_end = stream.offsetTrue(); + const int_end = stream.offsetTrue(); var n_digits = @as(isize, @intCast(stream.offsetTrue())); // the base being 16 implies a 0x prefix, which shouldn't be included in the digit count if (info.base == 16) n_digits -= 2; @@ -188,7 +188,7 @@ fn parsePartialNumberBase(comptime T: type, stream: *FloatStream, negative: bool // than 19 digits. That means we must have a decimal // point, and at least 1 fractional digit. stream.advance(1); - var marker = stream.offsetTrue(); + const marker = stream.offsetTrue(); tryParseNDigits(MantissaT, stream, &mantissa, info.base, info.max_mantissa_digits); break :blk @as(i64, @intCast(marker)) - @as(i64, @intCast(stream.offsetTrue())); } |
