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

Merged
moodyjon merged 1 commit from slicebacked_type_param into master 2022-09-07 12:39:34 +02:00
moodyjon commented 2022-08-30 23:30:29 +02:00 (Migrated from github.com)

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.

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.
jeffreypicard (Migrated from github.com) reviewed 2022-08-30 23:30:29 +02:00
jeffreypicard commented 2022-09-06 15:05:30 +02:00 (Migrated from github.com)

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.

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 commented 2022-09-06 15:06:03 +02:00 (Migrated from github.com)

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

Otherwise this looks good, I like taking advantage of these features.
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: LBRYCommunity/herald.go#56
No description provided.