Don't let repeat_vars() return unnecessary Result

This commit is contained in:
Hocuri
2022-04-22 15:52:53 +02:00
committed by holger krekel
parent a4f5d2b9b2
commit 2b233fd810
8 changed files with 14 additions and 14 deletions

View File

@@ -843,10 +843,10 @@ async fn prune_tombstones(sql: &Sql) -> Result<()> {
///
/// Use this together with [`rusqlite::ParamsFromIter`] to use dynamically generated
/// parameter lists.
pub fn repeat_vars(count: usize) -> Result<String> {
pub fn repeat_vars(count: usize) -> String {
let mut s = "?,".repeat(count);
s.pop(); // Remove trailing comma
Ok(s)
s
}
#[cfg(test)]