From 017fb398beea0a3ae66b07e2023be05af7921b13 Mon Sep 17 00:00:00 2001 From: "Dustin J. Mitchell" Date: Mon, 24 Jan 2022 04:14:10 +0000 Subject: [PATCH] replace a clone with a copy --- lib/src/uuid.rs | 3 +-- lib/taskchampion.h | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/src/uuid.rs b/lib/src/uuid.rs index 8ce407afc..5e3492bea 100644 --- a/lib/src/uuid.rs +++ b/lib/src/uuid.rs @@ -10,8 +10,7 @@ pub struct TCUuid([u8; 16]); impl From for TCUuid { fn from(uuid: Uuid) -> TCUuid { - // TODO: can we avoid clone here? - TCUuid(uuid.as_bytes().clone()) + TCUuid(*uuid.as_bytes()) } } diff --git a/lib/taskchampion.h b/lib/taskchampion.h index ad42de148..560f23eb1 100644 --- a/lib/taskchampion.h +++ b/lib/taskchampion.h @@ -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.