Skip to content

Commit

Permalink
add comment on generate_composite_uuid describing what the method does
Browse files Browse the repository at this point in the history
  • Loading branch information
jakobhellermann committed Mar 14, 2022
1 parent d9ee1f4 commit 8ede521
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions crates/bevy_reflect/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@ pub use erased_serde;
pub mod __macro_exports {
use crate::Uuid;

/// Generates a new UUID from the given UUIDs `a` and `b`,
/// where the bytes are generated by a bitwise `a ^ b.rotate_right(1)`.
/// The generated UUID will be a UUIDv4 (meaning that the bytes should be random, not e.g. derived from the system time).
#[allow(clippy::unusual_byte_groupings)] // unusual byte grouping is meant to signal the relevant bits
pub const fn generate_composite_uuid(a: Uuid, b: Uuid) -> Uuid {
let mut new = [0; 16];
Expand Down

0 comments on commit 8ede521

Please sign in to comment.