mirror of
https://github.com/uuid-rs/uuid.git
synced 2025-10-01 15:01:05 +00:00
16 lines
302 B
Rust
16 lines
302 B
Rust
//! Generating a sortable UUID.
|
|
//!
|
|
//! If you enable the `v7` feature you can generate sortable UUIDs.
|
|
|
|
#[test]
|
|
#[cfg(feature = "v7")]
|
|
fn generate_sortable_uuid() {
|
|
use uuid::Uuid;
|
|
|
|
let uuid = Uuid::now_v7();
|
|
|
|
assert_eq!(Some(uuid::Version::SortRand), uuid.get_version());
|
|
}
|
|
|
|
fn main() {}
|