Skip to content

Commit

Permalink
Merge pull request #721 from uuid-rs/fix/uuid-macro
Browse files Browse the repository at this point in the history
Fix uuid macro in consts
  • Loading branch information
KodrAus committed Nov 20, 2023
2 parents 4609e61 + f3f7496 commit c889107
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
4 changes: 2 additions & 2 deletions Cargo.toml
Expand Up @@ -27,7 +27,7 @@ homepage = "https://github.com/uuid-rs/uuid"
name = "uuid"
readme = "README.md"
repository = "https://github.com/uuid-rs/uuid"
version = "1.6.0" # remember to update html_root_url in lib.rs
version = "1.6.1" # remember to update html_root_url in lib.rs
rust-version = "1.60.0"

[package.metadata.docs.rs]
Expand Down Expand Up @@ -150,7 +150,7 @@ version = "1"
# Use the `macro-diagnostics` feature instead
[dependencies.uuid-macro-internal]
package = "uuid-macro-internal"
version = "1.6.0"
version = "1.6.1"
path = "macros"
optional = true

Expand Down
6 changes: 3 additions & 3 deletions README.md
Expand Up @@ -28,7 +28,7 @@ Add the following to your `Cargo.toml`:

```toml
[dependencies.uuid]
version = "1.6.0"
version = "1.6.1"
features = [
"v4", # Lets you generate random UUIDs
"fast-rng", # Use a faster (but still sufficiently random) RNG
Expand Down Expand Up @@ -65,11 +65,11 @@ assert_eq!(Some(Version::Random), my_uuid.get_version());
If you'd like to parse UUIDs _really_ fast, check out the [`uuid-simd`](https://github.com/nugine/uuid-simd)
library.

For more details on using `uuid`, [see the library documentation](https://docs.rs/uuid/1.6.0/uuid).
For more details on using `uuid`, [see the library documentation](https://docs.rs/uuid/1.6.1/uuid).

## References

* [`uuid` library docs](https://docs.rs/uuid/1.6.0/uuid).
* [`uuid` library docs](https://docs.rs/uuid/1.6.1/uuid).
* [Wikipedia: Universally Unique Identifier](http://en.wikipedia.org/wiki/Universally_unique_identifier).
* [RFC4122: A Universally Unique IDentifier (UUID) URN Namespace](http://tools.ietf.org/html/rfc4122).

Expand Down
2 changes: 1 addition & 1 deletion macros/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "uuid-macro-internal"
version = "1.6.0"
version = "1.6.1"
edition = "2018"
authors = [
"QnnOkabayashi"
Expand Down
8 changes: 4 additions & 4 deletions src/lib.rs
Expand Up @@ -39,7 +39,7 @@
//!
//! ```toml
//! [dependencies.uuid]
//! version = "1.6.0"
//! version = "1.6.1"
//! features = [
//! "v4", # Lets you generate random UUIDs
//! "fast-rng", # Use a faster (but still sufficiently random) RNG
Expand Down Expand Up @@ -141,7 +141,7 @@
//!
//! ```toml
//! [dependencies.uuid]
//! version = "1.6.0"
//! version = "1.6.1"
//! features = [
//! "v4",
//! "v7",
Expand All @@ -156,7 +156,7 @@
//!
//! ```toml
//! [dependencies.uuid]
//! version = "1.6.0"
//! version = "1.6.1"
//! default-features = false
//! ```
//!
Expand Down Expand Up @@ -214,7 +214,7 @@
#![doc(
html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
html_favicon_url = "https://www.rust-lang.org/favicon.ico",
html_root_url = "https://docs.rs/uuid/1.6.0"
html_root_url = "https://docs.rs/uuid/1.6.1"
)]

#[cfg(any(feature = "std", test))]
Expand Down
2 changes: 1 addition & 1 deletion src/macros.rs
Expand Up @@ -16,7 +16,7 @@ macro_rules! define_uuid_macro {
($uuid:literal) => {{
const OUTPUT: $crate::Uuid = match $crate::Uuid::try_parse($uuid) {
$crate::__macro_support::Ok(u) => u,
$crate::__macro_support::Err(e) => panic!("{}", e),
$crate::__macro_support::Err(_) => panic!("invalid UUID"),
};
OUTPUT
}};
Expand Down

0 comments on commit c889107

Please sign in to comment.