Skip to content

Commit 8e82077

Browse files
committed
update
1 parent d31ccf4 commit 8e82077

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/lib.rs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -315,9 +315,9 @@ fn uuid1(node: Option<u64>, clock_seq: Option<u64>) -> PyResult<UUID> {
315315
let dur = SystemTime::now()
316316
.duration_since(SystemTime::UNIX_EPOCH)
317317
.unwrap();
318-
let ts =
318+
let timestamp =
319319
Timestamp::from_unix_time(dur.as_secs(), dur.subsec_nanos(), clock_seq as u128, 14);
320-
Uuid::new_v1(ts, node)
320+
Uuid::new_v1(timestamp, node)
321321
}
322322
None => Uuid::now_v1(node),
323323
};
@@ -366,9 +366,10 @@ fn uuid6(node: Option<u64>, timestamp: Option<u64>, nanos: Option<u32>) -> PyRes
366366

367367
let uuid = match timestamp {
368368
Some(timestamp) => {
369-
let ts = Timestamp::from_unix(&Context::new_random(), timestamp, nanos.unwrap_or(0));
369+
let timestamp =
370+
Timestamp::from_unix(&Context::new_random(), timestamp, nanos.unwrap_or(0));
370371
return Ok(UUID {
371-
uuid: Uuid::new_v6(ts, node),
372+
uuid: Uuid::new_v6(timestamp, node),
372373
});
373374
}
374375
None => Uuid::now_v6(node),

0 commit comments

Comments
 (0)