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 authored and Andrew Kelley committed 2023-07-03 11:00:13 -07:00
1 parent 2583a39fb6
commit 2b8687ba2d
8 files changed
+71 -58

No files matched your search

+1 -1
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()));
},