From cfed9b149c7c485f80ac0b87fe603fe007cc235d Mon Sep 17 00:00:00 2001 From: EliasSchriefer Date: Thu, 8 Jul 2021 16:17:43 +0200 Subject: [PATCH] Change sql template concatting Switch out `format!` with `concat!`, which is doing work at compile time ...as far as I know at least --- src/main.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/main.rs b/src/main.rs index 84b2fc1..4ccb876 100644 --- a/src/main.rs +++ b/src/main.rs @@ -96,8 +96,7 @@ async fn connect_sqlite(path: &PathBuf) -> sqlx::Result { #[cfg(feature = "sqlite")] async fn load_sqlite_template(sqlite_handle: &mut SqliteConnection) -> sqlx::Result { - sqlx::query(&*format!( - "{} {} {} {} {} {}", + sqlx::query(concat!( include_str!("sqlite/users.sql"), include_str!("sqlite/security_preferences.sql"), include_str!("sqlite/privacy_preferences.sql"),