Skip to content

Commit

Permalink
Tidy: add std hasUniqueRepresentation to banned list
Browse files Browse the repository at this point in the history
  • Loading branch information
cb22 committed Oct 23, 2023
1 parent 06bb128 commit c367d1d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/tidy.zig
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,11 @@ fn banned(source: []const u8) ?[]const u8 {
if (std.mem.indexOf(u8, source, "std." ++ "BoundedArray") != null) {
return "use stdx." ++ "BoundedArray instead of std version";
}

if (std.mem.indexOf(u8, source, "trait." ++ "hasUniqueRepresentation") != null) {
return "use stdx." ++ "hasUniqueRepresentation instead of std version";
}

return null;
}

Expand Down

0 comments on commit c367d1d

Please sign in to comment.