summaryrefslogtreecommitdiff
path: root/src/db/mod.rs
diff options
context:
space:
mode:
authorWriterV2 <primary-v2@protonmail.com>2024-11-24 12:17:32 +0100
committerWriterV2 <primary-v2@protonmail.com>2024-11-24 12:17:32 +0100
commit364763e039b286774c29c4995df6baba9d22a61a (patch)
tree479549136d47ae4ed0e5ceb6acffaf94a110bc47 /src/db/mod.rs
parent680867b4bb5e2708f02fc3f8c21c3563975c44c7 (diff)
Perf: Avoid unnecessary heap allocations of strings
Diffstat (limited to 'src/db/mod.rs')
-rw-r--r--src/db/mod.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/db/mod.rs b/src/db/mod.rs
index 51665a3..f1baf44 100644
--- a/src/db/mod.rs
+++ b/src/db/mod.rs
@@ -19,9 +19,9 @@ pub trait ProductDatabaseHandler {
async fn post(
&self,
pool: &SqlitePool,
- name: String,
- description: String,
- tags: Vec<String>,
+ name: &str,
+ description: &str,
+ tags: Vec<&str>,
) -> Result<Self, AppError>
where
Self: Sized;