From 0e6add51f92154ae43b026dea190650f8d80edfb Mon Sep 17 00:00:00 2001 From: Sayan Nandan Date: Sun, 23 Jun 2024 18:14:31 +0530 Subject: [PATCH] response: Add SQParam for `&Vec` --- CHANGELOG.md | 1 + src/query.rs | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3c4b888..6b00246 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ All changes in this project will be noted in this file. ### Additions - Added `FromResponse` for `Vec` +- Added `SQParam` impl for `&Vec` ## 0.8.7 diff --git a/src/query.rs b/src/query.rs index e8445cd..3254c9b 100644 --- a/src/query.rs +++ b/src/query.rs @@ -366,6 +366,11 @@ impl SQParam for Vec { 1 } } +impl<'a> SQParam for &'a Vec { + fn append_param(&self, q: &mut Vec) -> usize { + self.as_slice().append_param(q) + } +} // str impl<'a> SQParam for &'a str { fn append_param(&self, buf: &mut Vec) -> usize {