Skip to content

Commit

Permalink
update docs for random on embedded
Browse files Browse the repository at this point in the history
  • Loading branch information
KodrAus committed Nov 1, 2021
1 parent be01b14 commit c84f5b8
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
7 changes: 6 additions & 1 deletion src/builder.rs
Expand Up @@ -127,7 +127,12 @@ impl Uuid {
/// uuid.to_hyphenated().to_string(),
/// );
/// ```
pub const fn from_fields_le(d1: u32, d2: u16, d3: u16, d4: &[u8; 8]) -> Uuid {
pub const fn from_fields_le(
d1: u32,
d2: u16,
d3: u16,
d4: &[u8; 8],
) -> Uuid {
Uuid::from_bytes([
d1 as u8,
(d1 >> 8) as u8,
Expand Down
4 changes: 3 additions & 1 deletion src/lib.rs
Expand Up @@ -114,7 +114,9 @@
//!
//! If you need to use `v4` in a no-std environment, you'll need to
//! follow [`getrandom`'s docs] on configuring a source of randomness
//! on currently unsupported targets.
//! on currently unsupported targets. Alternatively, you can produce
//! random bytes yourself and then pass them to [`Builder::from_random_bytes`]
//! without enabling the `v4` feature.
//!
//! # Examples
//!
Expand Down
3 changes: 2 additions & 1 deletion src/v4.rs
Expand Up @@ -7,7 +7,8 @@ impl Uuid {
/// as the source of random numbers. If you'd like to use a custom
/// generator, don't use this method: generate random bytes using your
/// custom generator and pass them to the
/// [`uuid::Builder::from_random_bytes`][from_random_bytes] function instead.
/// [`uuid::Builder::from_random_bytes`][from_random_bytes] function
/// instead.
///
/// Note that usage of this method requires the `v4` feature of this crate
/// to be enabled.
Expand Down

0 comments on commit c84f5b8

Please sign in to comment.