Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: uuid-rs/uuid
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 1.3.1
Choose a base ref
...
head repository: uuid-rs/uuid
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 1.3.2
Choose a head ref
  • 6 commits
  • 5 files changed
  • 3 contributors

Commits on Apr 12, 2023

  1. Create SECURITY.md

    KodrAus authored Apr 12, 2023
    Copy the full SHA
    f1919c1 View commit details

Commits on Apr 17, 2023

  1. Merge pull request #668 from uuid-rs/KodrAus-patch-1

    Create SECURITY.md
    KodrAus authored Apr 17, 2023
    Copy the full SHA
    f725e58 View commit details

Commits on Apr 29, 2023

  1. Copy the full SHA
    7978c5a View commit details
  2. Merge pull request #669 from pkoenig10/as_u128

    Faster as_u128 and to_u128_le
    KodrAus authored Apr 29, 2023

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    a78ee0a View commit details
  3. prepare for 1.3.2 release

    KodrAus committed Apr 29, 2023

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    f0c3f1a View commit details
  4. Merge pull request #670 from uuid-rs/cargo/1.3.2

    prepare for 1.3.2 release
    KodrAus authored Apr 29, 2023

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    52867d4 View commit details
Showing with 25 additions and 42 deletions.
  1. +2 −2 Cargo.toml
  2. +3 −3 README.md
  3. +13 −0 SECURITY.md
  4. +1 −1 macros/Cargo.toml
  5. +6 −36 src/lib.rs
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -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.3.1" # remember to update html_root_url in lib.rs
version = "1.3.2" # remember to update html_root_url in lib.rs

[package.metadata.docs.rs]
rustc-args = ["--cfg", "uuid_unstable"]
@@ -134,7 +134,7 @@ version = "1"
# Use the `macro-diagnostics` feature instead
[dependencies.uuid-macro-internal]
package = "uuid-macro-internal"
version = "1.3.1"
version = "1.3.2"
path = "macros"
optional = true

6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -29,7 +29,7 @@ Add the following to your `Cargo.toml`:

```toml
[dependencies.uuid]
version = "1.3.1"
version = "1.3.2"
features = [
"v4", # Lets you generate random UUIDs
"fast-rng", # Use a faster (but still sufficiently random) RNG
@@ -66,7 +66,7 @@ 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.3.1/uuid).
For more details on using `uuid`, [see the library documentation](https://docs.rs/uuid/1.3.2/uuid).

## Minimum Supported Rust Version (MSRV)

@@ -75,7 +75,7 @@ CI. It may be bumped in minor releases as necessary.

## References

* [`uuid` library docs](https://docs.rs/uuid/1.3.1/uuid).
* [`uuid` library docs](https://docs.rs/uuid/1.3.2/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).

13 changes: 13 additions & 0 deletions SECURITY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Security Policy

## Supported Versions

Security updates are applied only to the latest release.

## Reporting a Vulnerability

If you have discovered a security vulnerability in this project, please report it privately. **Do not disclose it as a public issue.** This gives us time to work with you to fix the issue before public exposure, reducing the chance that the exploit will be used before a patch is released.

Please disclose it at [security advisory](https://github.com/uuid-rs/uuid/security/advisories/new).

This project is maintained by a team of volunteers on a reasonable-effort basis. As such, please give us at least 90 days to work on a fix before public exposure.
2 changes: 1 addition & 1 deletion macros/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "uuid-macro-internal"
version = "1.3.1"
version = "1.3.2"
edition = "2018"
authors = [
"QnnOkabayashi"
42 changes: 6 additions & 36 deletions src/lib.rs
Original file line number Diff line number Diff line change
@@ -39,7 +39,7 @@
//!
//! ```toml
//! [dependencies.uuid]
//! version = "1.3.1"
//! version = "1.3.2"
//! features = [
//! "v4", # Lets you generate random UUIDs
//! "fast-rng", # Use a faster (but still sufficiently random) RNG
@@ -138,7 +138,7 @@
//!
//! ```toml
//! [dependencies.uuid]
//! version = "1.3.1"
//! version = "1.3.2"
//! features = [
//! "v4",
//! "v7",
@@ -153,7 +153,7 @@
//!
//! ```toml
//! [dependencies.uuid]
//! version = "1.3.1"
//! version = "1.3.2"
//! default-features = false
//! ```
//!
@@ -211,7 +211,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.3.1"
html_root_url = "https://docs.rs/uuid/1.3.2"
)]

#[cfg(any(feature = "std", test))]
@@ -687,22 +687,7 @@ impl Uuid {
/// # }
/// ```
pub const fn as_u128(&self) -> u128 {
(self.as_bytes()[0] as u128) << 120
| (self.as_bytes()[1] as u128) << 112
| (self.as_bytes()[2] as u128) << 104
| (self.as_bytes()[3] as u128) << 96
| (self.as_bytes()[4] as u128) << 88
| (self.as_bytes()[5] as u128) << 80
| (self.as_bytes()[6] as u128) << 72
| (self.as_bytes()[7] as u128) << 64
| (self.as_bytes()[8] as u128) << 56
| (self.as_bytes()[9] as u128) << 48
| (self.as_bytes()[10] as u128) << 40
| (self.as_bytes()[11] as u128) << 32
| (self.as_bytes()[12] as u128) << 24
| (self.as_bytes()[13] as u128) << 16
| (self.as_bytes()[14] as u128) << 8
| (self.as_bytes()[15] as u128)
u128::from_be_bytes(*self.as_bytes())
}

/// Returns a 128bit little-endian value containing the value.
@@ -731,22 +716,7 @@ impl Uuid {
/// # }
/// ```
pub const fn to_u128_le(&self) -> u128 {
(self.as_bytes()[0] as u128)
| (self.as_bytes()[1] as u128) << 8
| (self.as_bytes()[2] as u128) << 16
| (self.as_bytes()[3] as u128) << 24
| (self.as_bytes()[4] as u128) << 32
| (self.as_bytes()[5] as u128) << 40
| (self.as_bytes()[6] as u128) << 48
| (self.as_bytes()[7] as u128) << 56
| (self.as_bytes()[8] as u128) << 64
| (self.as_bytes()[9] as u128) << 72
| (self.as_bytes()[10] as u128) << 80
| (self.as_bytes()[11] as u128) << 88
| (self.as_bytes()[12] as u128) << 96
| (self.as_bytes()[13] as u128) << 104
| (self.as_bytes()[14] as u128) << 112
| (self.as_bytes()[15] as u128) << 120
u128::from_le_bytes(*self.as_bytes())
}

/// Returns two 64bit values containing the value.