Merge "Update usage of uuid crate"

This commit is contained in:
Chris Wailes 2023-03-30 18:46:33 +00:00 committed by Gerrit Code Review
commit 98345c2dd6
1 changed files with 2 additions and 2 deletions

View File

@ -227,8 +227,8 @@ fn uuid(node_id: &[u8]) -> Result<String> {
let context = Context::new(0); let context = Context::new(0);
let now = SystemTime::now().duration_since(UNIX_EPOCH)?; let now = SystemTime::now().duration_since(UNIX_EPOCH)?;
let ts = Timestamp::from_unix(context, now.as_secs(), now.subsec_nanos()); let ts = Timestamp::from_unix(context, now.as_secs(), now.subsec_nanos());
let uuid = Uuid::new_v1(ts, node_id)?; let uuid = Uuid::new_v1(ts, node_id.try_into()?);
Ok(String::from(uuid.to_hyphenated().encode_lower(&mut Uuid::encode_buffer()))) Ok(String::from(uuid.hyphenated().encode_lower(&mut Uuid::encode_buffer())))
} }
#[cfg(test)] #[cfg(test)]