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

datastore: tidy up some byte slice conversions #935

Merged
merged 1 commit into from
Jan 24, 2023

Conversation

tgeoghegan
Copy link
Contributor

By adding a couple of TryFrom<&[u8]> implementations, we can make use of RowExt::get_bytea_and_convert to get things like TaskId, ReportId or other types that are simple wrappers around fixed-size byte arrays from database rows.

@tgeoghegan tgeoghegan requested a review from a team as a code owner January 24, 2023 19:47
By adding a couple of `TryFrom<&[u8]>` implementations, we can make use
of `RowExt::get_bytea_and_convert` to get things like `TaskId`,
`ReportId` or other types that are simple wrappers around fixed-size
byte arrays from database rows.
@tgeoghegan tgeoghegan force-pushed the timg/datastore-bytea-try-from branch from 61633bf to b9d3c52 Compare January 24, 2023 20:16
@tgeoghegan tgeoghegan merged commit 0613aa0 into main Jan 24, 2023
@tgeoghegan tgeoghegan deleted the timg/datastore-bytea-try-from branch January 24, 2023 21:22
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