replace a clone with a copy

This commit is contained in:
Dustin J. Mitchell 2022-01-24 04:14:10 +00:00
parent 40f30c6d89
commit 017fb398be
2 changed files with 2 additions and 3 deletions

View file

@ -10,8 +10,7 @@ pub struct TCUuid([u8; 16]);
impl From<Uuid> for TCUuid {
fn from(uuid: Uuid) -> TCUuid {
// TODO: can we avoid clone here?
TCUuid(uuid.as_bytes().clone())
TCUuid(*uuid.as_bytes())
}
}

View file

@ -23,7 +23,7 @@ struct TCReplica;
///
/// Unless specified otherwise, functions in this API take ownership of a TCString when it appears
/// as a function argument, and transfer ownership to the caller when the TCString appears as a
/// return value or otput argument.
/// return value or output argument.
struct TCString;
/// A task, as publicly exposed by this library.