diff --git a/src/ts_generator/sql_parser/expressions/translate_table_with_joins.test.rs b/src/ts_generator/sql_parser/expressions/translate_table_with_joins.test.rs index 58b9169a..be33eb11 100644 --- a/src/ts_generator/sql_parser/expressions/translate_table_with_joins.test.rs +++ b/src/ts_generator/sql_parser/expressions/translate_table_with_joins.test.rs @@ -21,16 +21,13 @@ mod tests { let stmt = sql_ast[0].clone(); if let Statement::Query(query) = stmt { let body = *query.body; - match body { - SetExpr::Select(select) => { - let select_item = select.projection[0].clone(); - let table_with_joins = select.from; + if let SetExpr::Select(select) = body { + let select_item = select.projection[0].clone(); + let table_with_joins = select.from; - let result = translate_table_with_joins(&Some(table_with_joins), &select_item); + let result = translate_table_with_joins(&Some(table_with_joins), &select_item); - assert_eq!(Some("items".to_string()), result) - } - _ => (), + assert_eq!(Some("items".to_string()), result) } } } diff --git a/tests/generate_path.rs b/tests/generate_path.rs index 1d738826..35bba8c2 100644 --- a/tests/generate_path.rs +++ b/tests/generate_path.rs @@ -3,7 +3,6 @@ #[cfg(test)] mod generate_path_tests { use assert_cmd::prelude::*; - use predicates::prelude::*; use std::env; use std::fs; use std::io::Write; diff --git a/tests/mysql_delete_query_parameters.rs b/tests/mysql_delete_query_parameters.rs index cc70609e..4484a5e6 100644 --- a/tests/mysql_delete_query_parameters.rs +++ b/tests/mysql_delete_query_parameters.rs @@ -1,7 +1,6 @@ #[cfg(test)] mod mysql_delete_query_parameters { use assert_cmd::prelude::*; - use predicates::prelude::*; use pretty_assertions::assert_eq; use std::env; use std::fs; diff --git a/tests/mysql_insert_query_parameters.rs b/tests/mysql_insert_query_parameters.rs index 2c800680..dae55909 100644 --- a/tests/mysql_insert_query_parameters.rs +++ b/tests/mysql_insert_query_parameters.rs @@ -1,7 +1,6 @@ #[cfg(test)] mod mysql_insert_query_parameters { use assert_cmd::prelude::*; - use predicates::prelude::*; use pretty_assertions::assert_eq; use std::env; use std::fs; diff --git a/tests/mysql_query_parameters.rs b/tests/mysql_query_parameters.rs index c0632d61..011704c9 100644 --- a/tests/mysql_query_parameters.rs +++ b/tests/mysql_query_parameters.rs @@ -1,7 +1,6 @@ #[cfg(test)] mod mysql_query_parameters_tests { use assert_cmd::prelude::*; - use predicates::prelude::*; use pretty_assertions::assert_eq; use std::env; use std::fs; diff --git a/tests/mysql_update_query_parameters.rs b/tests/mysql_update_query_parameters.rs index 14ea5fea..88a08723 100644 --- a/tests/mysql_update_query_parameters.rs +++ b/tests/mysql_update_query_parameters.rs @@ -1,7 +1,6 @@ #[cfg(test)] mod mysql_update_query_parameters { use assert_cmd::prelude::*; - use predicates::prelude::*; use pretty_assertions::assert_eq; use std::env; use std::fs; diff --git a/tests/postgres_delete_query_parameters.rs b/tests/postgres_delete_query_parameters.rs index 62068004..9863c811 100644 --- a/tests/postgres_delete_query_parameters.rs +++ b/tests/postgres_delete_query_parameters.rs @@ -1,7 +1,6 @@ #[cfg(test)] mod mysql_delete_query_parameters { use assert_cmd::prelude::*; - use predicates::prelude::*; use pretty_assertions::assert_eq; use std::env; use std::fs; diff --git a/tests/postgres_insert_query_parameters.rs b/tests/postgres_insert_query_parameters.rs index 052b8406..4812521b 100644 --- a/tests/postgres_insert_query_parameters.rs +++ b/tests/postgres_insert_query_parameters.rs @@ -1,7 +1,6 @@ #[cfg(test)] mod postgres_insert_query_parameters { use assert_cmd::prelude::*; - use predicates::prelude::*; use pretty_assertions::assert_eq; use std::env; use std::fs; diff --git a/tests/postgres_query_parameters.rs b/tests/postgres_query_parameters.rs index 094e2280..e3616e7f 100644 --- a/tests/postgres_query_parameters.rs +++ b/tests/postgres_query_parameters.rs @@ -1,7 +1,6 @@ #[cfg(test)] mod postgres_query_parameters_tests { use assert_cmd::prelude::*; - use predicates::prelude::*; use std::env; use std::fs; use std::io::Write; diff --git a/tests/postgres_update_query_parameters.rs b/tests/postgres_update_query_parameters.rs index a84c8ac8..fe30e054 100644 --- a/tests/postgres_update_query_parameters.rs +++ b/tests/postgres_update_query_parameters.rs @@ -1,7 +1,6 @@ #[cfg(test)] mod postgres_update_query_parameters { use assert_cmd::prelude::*; - use predicates::prelude::*; use pretty_assertions::assert_eq; use std::env; use std::fs; diff --git a/tests/sqlxrc_file.rs b/tests/sqlxrc_file.rs index 636ec05f..84848e64 100644 --- a/tests/sqlxrc_file.rs +++ b/tests/sqlxrc_file.rs @@ -3,7 +3,6 @@ #[cfg(test)] mod sqlxrc_file { use assert_cmd::prelude::*; - use predicates::prelude::*; use std::env; use std::fs; use std::io::Write; diff --git a/tests/string_functions.rs b/tests/string_functions.rs index 2fc60bff..eabbe906 100644 --- a/tests/string_functions.rs +++ b/tests/string_functions.rs @@ -1,7 +1,6 @@ #[cfg(test)] mod string_functions_tests { use assert_cmd::prelude::*; - use predicates::prelude::*; use std::env; use std::fs; use std::io::Write;