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

Add element type param T to SlicedBacked[T]. Require T satisfy #56

Merged
merged 1 commit into from
Sep 7, 2022

Conversation

moodyjon
Copy link
Contributor

Add element type param T to SlicedBacked[T]. Require T satisfy constraints.Ordered to make BisectRight() statically type-safe.

Found this working on the RPCs. I want to use db.TxCounts to lookup the height of a TXO. (And I don't have two txcounts, just one). While changing the argument/return signature, I added a type param.

constraints.Ordered to make BisectRight() statically type-safe.
@jeffreypicard
Copy link
Collaborator

We should figure out why the unit tests don't run automatically for PRs from other repos, or if you have the permissions you could just make branches in our repo and I think then they'll trigger properly.

@jeffreypicard
Copy link
Collaborator

Otherwise this looks good, I like taking advantage of these features.

@moodyjon moodyjon merged commit c38134b into lbryio:master Sep 7, 2022
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.

2 participants