Change sql template concatting

Switch out `format!` with `concat!`, which is doing work at compile time

...as far as I know at least
This commit is contained in:
Elias Schriefer 2021-07-08 16:17:43 +02:00
parent 212b2d3bf2
commit cfed9b149c

View File

@ -96,8 +96,7 @@ async fn connect_sqlite(path: &PathBuf) -> sqlx::Result<SqliteConnection> {
#[cfg(feature = "sqlite")]
async fn load_sqlite_template(sqlite_handle: &mut SqliteConnection) -> sqlx::Result<SqliteQueryResult> {
sqlx::query(&*format!(
"{} {} {} {} {} {}",
sqlx::query(concat!(
include_str!("sqlite/users.sql"),
include_str!("sqlite/security_preferences.sql"),
include_str!("sqlite/privacy_preferences.sql"),