Skip to content

Commit

Permalink
chore: small code improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
benfdking committed Sep 19, 2024
1 parent 696e8d7 commit 779222b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions rust/quary-databases/src/databases_connection.rs
Original file line number Diff line number Diff line change
Expand Up @@ -269,11 +269,11 @@ pub fn database_query_generator_from_config(
let config = config.config.ok_or("No config provided".to_string())?;
match config {
SqliteInMemory(_) => {
let database = DatabaseQueryGeneratorSqlite::default();
let database = DatabaseQueryGeneratorSqlite;
Ok(Box::new(database))
}
Sqlite(_) => {
let database = DatabaseQueryGeneratorSqlite::default();
let database = DatabaseQueryGeneratorSqlite;
Ok(Box::new(database))
}
BigQueryConfig(config) => {
Expand Down
2 changes: 1 addition & 1 deletion rust/quary-databases/src/databases_sqlite.rs
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ impl DatabaseConnection for Sqlite {
}

fn query_generator(&self) -> Box<dyn DatabaseQueryGenerator> {
Box::new(DatabaseQueryGeneratorSqlite::default())
Box::new(DatabaseQueryGeneratorSqlite)
}

async fn table_exists(&self, _path: &str) -> Result<Option<bool>, String> {
Expand Down

0 comments on commit 779222b

Please sign in to comment.