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

Update Uuid::new_v4 documentation to reflect Try no longer being implemented #521

Merged
merged 2 commits into from Aug 3, 2021

Conversation

Tehnix
Copy link
Contributor

@Tehnix Tehnix commented Jul 24, 2021

I'm submitting a(n) other (documentation fix)

Description

The current example at https://docs.rs/uuid/0.8.2/uuid/index.html#examples to generate a UUIDV4 currently does not compile, given that Uuid no longer implements Try.

This PR updates the example to match the one given in the README of this repo, along with enabling testing for it again to ensure it doesn't go out of date. I've run cargo test --all-features to ensure that the tests do indeed pass.

Finally, we also hide the configuration flags, #[cfg(feature = "v4")], from the example, since it should not be copied by the user of the crate, if they wanted to use the example.

Motivation

I was looking to generate a UUID V4 and unfortunately the examples in https://docs.rs/uuid/0.8.2/uuid/index.html#examples were out-of-date.

Tests

This enables the doc-test that was already there, which now compiles after updating the code in the example.

Related Issue(s)

None that I'm aware of

Tehnix added 2 commits Jul 24, 2021
It seems Uuid no longer implements `Try`, which makes Uuid::new_v4()? fail compilation. The `?`
was removed from the README in commit 8962ef6 but 
was not removed from the rust-doc in lib.rs.

Additionally, this also hides `#[cfg(feature = "v4")]` from the docs.
The doc testing of the Uuid::new_v4() example was currently disabled,
but after fixing the errors in df0dc49 the test is now working again.
@Tehnix Tehnix marked this pull request as ready for review Jul 24, 2021
Copy link
Member

@kinggoesgaming kinggoesgaming left a comment

Thank you

@kinggoesgaming
Copy link
Member

@kinggoesgaming kinggoesgaming commented Jul 26, 2021

bors r+

bors bot added a commit that referenced this issue Jul 26, 2021
521: Update Uuid::new_v4 documentation to reflect `Try` no longer being implemented r=kinggoesgaming a=Tehnix

<!--
    If this PR is a breaking change, ensure that you are opening it against 
    the `breaking` branch.  If the pull request is incomplete, prepend the Title with WIP: 
-->

**I'm submitting a(n)** other (documentation fix)


# Description
The current example at https://docs.rs/uuid/0.8.2/uuid/index.html#examples to generate a UUIDV4 currently does not compile, given that `Uuid` no longer implements `Try`.

This PR updates the example to match the one given in the README of this repo, along with enabling testing for it again to ensure it doesn't go out of date. I've run `cargo test --all-features` to ensure that the tests do indeed pass.

Finally, we also hide the configuration flags, `#[cfg(feature = "v4")]`, from the example, since it should not be copied by the user of the crate, if they wanted to use the example.

# Motivation
I was looking to generate a UUID V4 and unfortunately the examples in https://docs.rs/uuid/0.8.2/uuid/index.html#examples were out-of-date.

# Tests
<!-- How are these changes tested? -->
This enables the doc-test that was already there, which now compiles after updating the code in the example.

# Related Issue(s)
None that I'm aware of

Co-authored-by: Christian Kjær <ckl@codetalk.io>
Co-authored-by: Christian Kjaer Laustsen <ckl@codetalk.io>
@bors
Copy link
Contributor

@bors bors bot commented Jul 26, 2021

Timed out.

@KodrAus
Copy link
Member

@KodrAus KodrAus commented Aug 3, 2021

bors r+

bors bot added a commit that referenced this issue Aug 3, 2021
521: Update Uuid::new_v4 documentation to reflect `Try` no longer being implemented r=KodrAus a=Tehnix

<!--
    If this PR is a breaking change, ensure that you are opening it against 
    the `breaking` branch.  If the pull request is incomplete, prepend the Title with WIP: 
-->

**I'm submitting a(n)** other (documentation fix)


# Description
The current example at https://docs.rs/uuid/0.8.2/uuid/index.html#examples to generate a UUIDV4 currently does not compile, given that `Uuid` no longer implements `Try`.

This PR updates the example to match the one given in the README of this repo, along with enabling testing for it again to ensure it doesn't go out of date. I've run `cargo test --all-features` to ensure that the tests do indeed pass.

Finally, we also hide the configuration flags, `#[cfg(feature = "v4")]`, from the example, since it should not be copied by the user of the crate, if they wanted to use the example.

# Motivation
I was looking to generate a UUID V4 and unfortunately the examples in https://docs.rs/uuid/0.8.2/uuid/index.html#examples were out-of-date.

# Tests
<!-- How are these changes tested? -->
This enables the doc-test that was already there, which now compiles after updating the code in the example.

# Related Issue(s)
None that I'm aware of

Co-authored-by: Christian Kjær <ckl@codetalk.io>
Co-authored-by: Christian Kjaer Laustsen <ckl@codetalk.io>
@bors
Copy link
Contributor

@bors bors bot commented Aug 3, 2021

Timed out.

@Tehnix
Copy link
Contributor Author

@Tehnix Tehnix commented Aug 3, 2021

@KodrAus Hmm, is there anything I can do from my end w.r.t. the timeouts? (I don't have permission to the Bors output, so can't see what goes wrong) :/

@KodrAus
Copy link
Member

@KodrAus KodrAus commented Aug 3, 2021

@KodrAus r+

@KodrAus KodrAus merged commit c735394 into uuid-rs:master Aug 3, 2021
19 of 20 checks passed
@KodrAus
Copy link
Member

@KodrAus KodrAus commented Aug 3, 2021

That should do it 😁

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.

None yet

3 participants