Generate an ID for test data. Every time this function is called, it will return a new unique ID.
()
| 28 | /// |
| 29 | /// Every time this function is called, it will return a new unique ID. |
| 30 | pub fn next_unique_id() -> u64 { |
| 31 | UNIQUE_ID.with(|counter| { |
| 32 | let mut counter = counter.borrow_mut(); |
| 33 | *counter += 1; |
| 34 | *counter |
| 35 | }) |
| 36 | } |
| 37 | |
| 38 | fn next_unique_uuid() -> String { |
| 39 | Uuid::from_u128(next_unique_id().into()) |
no outgoing calls
no test coverage detected