1
0
Fork 0
firefox/third_party/rust/uuid/examples/random_uuid.rs
Daniel Baumann 5e9a113729
Adding upstream version 140.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
2025-06-25 09:37:52 +02:00

15 lines
294 B
Rust

//! Generating a random UUID.
//!
//! If you enable the `v4` feature you can generate random UUIDs.
#[test]
#[cfg(feature = "v4")]
fn generate_random_uuid() {
use uuid::Uuid;
let uuid = Uuid::new_v4();
assert_eq!(Some(uuid::Version::Random), uuid.get_version());
}
fn main() {}