Skip to content

Commit d605b52

Browse files
committed
implement new function to wrap the v4 creation of a random uuid so that we do not need to expose the uuid crate completely
1 parent eb89121 commit d605b52

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/uuid.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,3 +33,9 @@ impl From<uuid::Uuid> for Uuid {
3333
Uuid(uuid)
3434
}
3535
}
36+
37+
impl Uuid {
38+
pub fn new() -> uuid::Uuid {
39+
uuid::Uuid::new_v4()
40+
}
41+
}

0 commit comments

Comments
 (0)