Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ArrayHashMap confusing documentation #19990

Open
MrBrN197 opened this issue May 17, 2024 · 1 comment
Open

ArrayHashMap confusing documentation #19990

MrBrN197 opened this issue May 17, 2024 · 1 comment
Labels
Milestone

Comments

@MrBrN197
Copy link

this documentation for Context in ArrayHashMap seems to suggest the eql function takes 2 args but the compiler complains that it needs 3 arguments.

pub fn ArrayHashMap(
comptime K: type,
comptime V: type,
/// A namespace that provides these two functions:
/// * `pub fn hash(self, K) u32`
/// * `pub fn eql(self, K, K) bool`
///
comptime Context: type,

@squeek502
Copy link
Collaborator

squeek502 commented May 17, 2024

Looks like it should be pub fn eql(self, K, K, second_keys_index) bool judging from array_hash_map.StringContext.eql:

pub fn eql(self: @This(), a: []const u8, b: []const u8, b_index: usize) bool {

@squeek502 squeek502 added the docs label May 17, 2024
@Vexu Vexu added this to the 0.13.0 milestone May 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants