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

Allow access of inner Uuid for adapters #511

Merged
merged 3 commits into from Jan 16, 2021
Merged

Conversation

hecsalazarf
Copy link
Contributor

@hecsalazarf hecsalazarf commented Jan 16, 2021

I'm submitting a feature.

Description

Trait implementations on the adapters:

  • From<Adapter> for Uuid
  • AsRef<Uuid> for Adapter
  • Borrow<Uuid> for Adapter

An Adapter::into_inner method that takes self and returns a Uuid.

Motivation

Open issue #482

Tests

All tests pass.

Related Issue(s)

Closes #482

@@ -1001,14 +1001,14 @@ macro_rules! impl_adapter_from {

impl<$a> AsRef<Uuid> for $T<$a> {
#[inline]
fn as_ref(&self) -> &$a Uuid {
Copy link
Contributor Author

@hecsalazarf hecsalazarf Jan 16, 2021

Choose a reason for hiding this comment

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

Removed lifetimes to support rust 1.34.0

@KodrAus
Copy link
Member

@KodrAus KodrAus commented Jan 16, 2021

bors r+

@bors
Copy link
Contributor

@bors bors bot commented Jan 16, 2021

Build succeeded:

@bors bors bot merged commit 54d7bec into uuid-rs:master Jan 16, 2021
21 checks passed
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