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

Search sorted #91

Merged
merged 2 commits into from
Mar 9, 2024
Merged

Search sorted #91

merged 2 commits into from
Mar 9, 2024

Conversation

gatesn
Copy link
Contributor

@gatesn gatesn commented Mar 9, 2024

Fixes #24

@gatesn gatesn enabled auto-merge (squash) March 9, 2024 11:26

fn search_sorted_cmp<T: NativePType, Cmp>(arr: &[T], target: T, cmp: Cmp) -> usize
where
Cmp: Fn(T, T) -> bool + 'static,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why do you need a 'static here?


fn search_sorted_cmp<T: NativePType, Cmp>(arr: &[T], target: T, cmp: Cmp) -> usize
where
Cmp: Fn(T, T) -> bool + 'static,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Cmp: Fn(T, T) -> bool + 'static,
Cmp: Fn(T, T) -> bool,

@gatesn gatesn merged commit 284e31a into develop Mar 9, 2024
1 check passed
@gatesn gatesn deleted the ngates/searchsorted branch March 9, 2024 20:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement search sorted and remove polars dependency
2 participants