mirror of
https://github.com/ziglang/zig.git
synced 2026-02-16 06:18:32 +00:00
fix merge conflicts
partially reapply b636d56d6a71b9ed521de7fccb519b7d0fa3db90
This commit is contained in:
parent
57e1fc29d2
commit
31e0b5c3c7
@ -595,10 +595,16 @@ pub const Serializer = struct {
|
||||
return self.writer.writeAll("inf");
|
||||
} else if (std.math.isNegativeInf(val)) {
|
||||
return self.writer.writeAll("-inf");
|
||||
} else if (std.math.isNegativeZero(val)) {
|
||||
return self.writer.writeAll("-0.0");
|
||||
} else {
|
||||
try std.fmt.format(self.writer, "{d}", .{val});
|
||||
},
|
||||
.comptime_float => if (val == 0) {
|
||||
return self.writer.writeAll("0");
|
||||
} else {
|
||||
try std.fmt.format(self.writer, "{d}", .{val});
|
||||
},
|
||||
.comptime_float => try std.fmt.format(self.writer, "{d}", .{val}),
|
||||
else => comptime unreachable,
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user