std.math.big.int: better name for equal function

All of the std except these few functions call it "eql" instead of "eq".
This has previously tripped me up when I expected the equality check function to be called "eql"
(just like all the rest of the std) instead of "eq".

The motivation is consistency.

If search "eq" on Autodoc, these functions stick out and it looks inconsistent.

I just noticed there are also a few functions spelling it out as "equal" (such as std.mem.allEqual).
Maybe those functions should also spell it "eql" but that can be done in a future PR.
This commit is contained in:
r00ster91
2023-07-02 11:40:01 -04:00
committed by Andrew Kelley
parent 2583a39fb6
commit 2b8687ba2d
8 changed files with 71 additions and 58 deletions

View File

@@ -7049,7 +7049,7 @@ pub fn intBitsForValue(mod: *Module, val: Value, sign: bool) u16 {
if (big.positive) return @as(u16, @intCast(big.bitCountAbs() + @intFromBool(sign)));
// Zero is still a possibility, in which case unsigned is fine
if (big.eqZero()) return 0;
if (big.eqlZero()) return 0;
return @as(u16, @intCast(big.bitCountTwosComp()));
},