-
Notifications
You must be signed in to change notification settings - Fork 179
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 PolarClass implementation for uuid::Uuid #554
Conversation
CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅ |
I have read the CLA Document and I hereby sign the CLA |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the contribution! This looks mostly good, just a few small changes and then this is good to go.
Co-authored-by: Sam Scott <[email protected]>
- Rely on default implementation for get_polar_class on Uuid PolarClass trait impl - Format get_polar_class_builder with rustfmt
- Add diesel mod to provide impl of PolarClass for Uuid - Rename uuid crate to uuid_v06 - Rename uuid feature to uuid_v06 - Rename extra feature group to diesel - Update PolarClass impl for Uuid to use full path for foreign types
We can consider adding a "diesel" group if diesel requires additional PolarClass impls, but for now I think we're good with a single feature flag for a single impl.
Thanks again @johnhalbert ! Credited you in the changelog 🙂 |
Adds implementation for foreign type uuid::Uuid. This is behind a feature gate
uuid
. Tests have been added to the/languages/rust/oso/tests/test_polar_rust.rs
suite. Tests require runningcargo test
with--features uuid
option. (e.g.$ cargo test --features uuid
)Note:
Cargo.toml
in/languages/rust/oso/
specifies version0.6.5
ofuuid
. The latest version is0.8.1
at the time of writing, but the version currently used in diesel orm is0.6.5
. Because of the popularity ofdiesel
, and the likelihood of persisting UUID's to the database in a web application context, I used0.6.5
for compatibility withdiesel
.PR checklist: