Skip to content

Commit

Permalink
clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
billy1624 committed May 6, 2024
1 parent 4693fc1 commit aa626fc
Show file tree
Hide file tree
Showing 41 changed files with 85 additions and 61 deletions.
2 changes: 2 additions & 0 deletions sea-orm-codegen/src/tests_cfg/mod.rs
@@ -1,3 +1,5 @@
#![allow(unused_imports, dead_code)]

pub mod duplicated_many_to_many_paths;
pub mod many_to_many;
pub mod many_to_many_multiple;
Expand Down
1 change: 0 additions & 1 deletion src/executor/query.rs
Expand Up @@ -1298,7 +1298,6 @@ mod tests {
use sea_query::Value;

use super::*;
use crate::error::*;

#[test]
fn from_try_get_error() {
Expand Down
2 changes: 2 additions & 0 deletions src/tests_cfg/mod.rs
@@ -1,3 +1,5 @@
#![allow(unused_imports, dead_code)]

//! Configurations for test cases and examples. Not intended for actual use.

pub mod cake;
Expand Down
2 changes: 2 additions & 0 deletions tests/active_enum_tests.rs
@@ -1,3 +1,5 @@
#![allow(unused_imports, dead_code)]

pub mod common;

use active_enum::Entity as ActiveEnumEntity;
Expand Down
2 changes: 2 additions & 0 deletions tests/basic.rs
@@ -1,3 +1,5 @@
#![allow(unused_imports, dead_code)]

pub mod common;

pub use sea_orm::{entity::*, error::*, query::*, sea_query, tests_cfg::*, Database, DbConn};
Expand Down
2 changes: 2 additions & 0 deletions tests/bits_tests.rs
@@ -1,3 +1,5 @@
#![allow(unused_imports, dead_code)]

pub mod common;

use common::features::*;
Expand Down
2 changes: 2 additions & 0 deletions tests/byte_primary_key_tests.rs
@@ -1,3 +1,5 @@
#![allow(unused_imports, dead_code)]

pub mod common;

pub use common::{features::*, setup::*, TestContext};
Expand Down
2 changes: 2 additions & 0 deletions tests/collection_tests.rs
@@ -1,3 +1,5 @@
#![allow(unused_imports, dead_code)]

pub mod common;

pub use common::{features::*, setup::*, TestContext};
Expand Down
7 changes: 2 additions & 5 deletions tests/connection_tests.rs
@@ -1,8 +1,5 @@
#![cfg(any(
feature = "sqlx-mysql",
feature = "sqlx-sqlite",
feature = "sqlx-postgres"
))]
#![allow(unused_imports, dead_code)]

pub mod common;

pub use common::{bakery_chain::*, setup::*, TestContext};
Expand Down
2 changes: 2 additions & 0 deletions tests/crud_tests.rs
@@ -1,3 +1,5 @@
#![allow(unused_imports, dead_code)]

pub mod common;
mod crud;

Expand Down
7 changes: 2 additions & 5 deletions tests/cursor_tests.rs
@@ -1,8 +1,5 @@
#![cfg(any(
feature = "sqlx-mysql",
feature = "sqlx-sqlite",
feature = "sqlx-postgres"
))]
#![allow(unused_imports, dead_code)]

pub mod common;

pub use common::{features::*, setup::*, TestContext};
Expand Down
2 changes: 2 additions & 0 deletions tests/delete_by_id_tests.rs
@@ -1,3 +1,5 @@
#![allow(unused_imports, dead_code)]

pub mod common;
pub use common::{features::*, setup::*, TestContext};
use sea_orm::{entity::prelude::*, DatabaseConnection, IntoActiveModel};
Expand Down
2 changes: 2 additions & 0 deletions tests/derive_iden_tests.rs
@@ -1,3 +1,5 @@
#![allow(unused_imports, dead_code)]

pub mod common;
pub use common::{features::*, setup::*, TestContext};
use sea_orm::entity::prelude::*;
Expand Down
2 changes: 2 additions & 0 deletions tests/dyn_table_name_tests.rs
@@ -1,3 +1,5 @@
#![allow(unused_imports, dead_code)]

pub mod common;

pub use common::{features::*, setup::*, TestContext};
Expand Down
2 changes: 2 additions & 0 deletions tests/empty_insert_tests.rs
@@ -1,3 +1,5 @@
#![allow(unused_imports, dead_code)]

pub mod common;
mod crud;

Expand Down
2 changes: 2 additions & 0 deletions tests/enum_primary_key_tests.rs
@@ -1,3 +1,5 @@
#![allow(unused_imports, dead_code)]

pub mod common;

pub use common::{features::*, setup::*, TestContext};
Expand Down
2 changes: 2 additions & 0 deletions tests/event_trigger_tests.rs
@@ -1,3 +1,5 @@
#![allow(unused_imports, dead_code)]

pub mod common;

pub use common::{
Expand Down
2 changes: 2 additions & 0 deletions tests/execute_unprepared_tests.rs
@@ -1,3 +1,5 @@
#![allow(unused_imports, dead_code)]

pub mod common;

pub use common::{features::*, setup::*, TestContext};
Expand Down
2 changes: 2 additions & 0 deletions tests/insert_default_tests.rs
@@ -1,3 +1,5 @@
#![allow(unused_imports, dead_code)]

pub mod common;

pub use common::{features::*, setup::*, TestContext};
Expand Down
2 changes: 2 additions & 0 deletions tests/json_struct_tests.rs
@@ -1,3 +1,5 @@
#![allow(unused_imports, dead_code)]

pub mod common;

pub use common::{features::*, setup::*, TestContext};
Expand Down
2 changes: 2 additions & 0 deletions tests/json_vec_tests.rs
@@ -1,3 +1,5 @@
#![allow(unused_imports, dead_code)]

pub mod common;

pub use common::{features::*, setup::*, TestContext};
Expand Down
7 changes: 2 additions & 5 deletions tests/loader_tests.rs
@@ -1,8 +1,5 @@
#![cfg(any(
feature = "sqlx-mysql",
feature = "sqlx-sqlite",
feature = "sqlx-postgres"
))]
#![allow(unused_imports, dead_code)]

pub mod common;

pub use common::{bakery_chain::*, setup::*, TestContext};
Expand Down
2 changes: 2 additions & 0 deletions tests/parallel_tests.rs
@@ -1,3 +1,5 @@
#![allow(unused_imports, dead_code)]

pub mod common;

pub use common::{features::*, setup::*, TestContext};
Expand Down
7 changes: 2 additions & 5 deletions tests/partial_model_tests.rs
@@ -1,8 +1,5 @@
#![cfg(any(
feature = "sqlx-mysql",
feature = "sqlx-sqlite",
feature = "sqlx-postgres"
))]
#![allow(unused_imports, dead_code)]

use entity::{Column, Entity};
use sea_orm::{ColumnTrait, DerivePartialModel, EntityTrait, FromQueryResult, ModelTrait};
use sea_query::Expr;
Expand Down
7 changes: 2 additions & 5 deletions tests/pi_tests.rs
@@ -1,8 +1,5 @@
#![cfg(any(
feature = "sqlx-mysql",
feature = "sqlx-sqlite",
feature = "sqlx-postgres"
))]
#![allow(unused_imports, dead_code)]

pub mod common;

use common::{features::*, setup::*, TestContext};
Expand Down
2 changes: 2 additions & 0 deletions tests/query_tests.rs
@@ -1,3 +1,5 @@
#![allow(unused_imports, dead_code)]

pub mod common;

pub use common::{bakery_chain::*, setup::*, TestContext};
Expand Down
7 changes: 2 additions & 5 deletions tests/relational_tests.rs
@@ -1,8 +1,5 @@
#![cfg(any(
feature = "sqlx-mysql",
feature = "sqlx-sqlite",
feature = "sqlx-postgres"
))]
#![allow(unused_imports, dead_code)]

pub mod common;

pub use chrono::offset::Utc;
Expand Down
7 changes: 2 additions & 5 deletions tests/returning_tests.rs
@@ -1,8 +1,5 @@
#![cfg(any(
feature = "sqlx-mysql",
feature = "sqlx-sqlite",
feature = "sqlx-postgres"
))]
#![allow(unused_imports, dead_code)]

pub mod common;

pub use common::{bakery_chain::*, setup::*, TestContext};
Expand Down
7 changes: 2 additions & 5 deletions tests/self_join_tests.rs
@@ -1,8 +1,5 @@
#![cfg(any(
feature = "sqlx-mysql",
feature = "sqlx-sqlite",
feature = "sqlx-postgres"
))]
#![allow(unused_imports, dead_code)]

pub mod common;

pub use common::{features::*, setup::*, TestContext};
Expand Down
17 changes: 7 additions & 10 deletions tests/sequential_op_tests.rs
@@ -1,15 +1,12 @@
#![cfg(any(
feature = "sqlx-mysql",
feature = "sqlx-sqlite",
feature = "sqlx-postgres"
))]
#![allow(unused_imports, dead_code)]

pub mod common;

pub use chrono::offset::Utc;
pub use common::{bakery_chain::*, setup::*, TestContext};
pub use rust_decimal::prelude::*;
pub use sea_orm::{entity::*, query::*, DatabaseConnection, FromQueryResult};
pub use uuid::Uuid;
use chrono::offset::Utc;
use common::{bakery_chain::*, setup::*, TestContext};
use rust_decimal::prelude::*;
use sea_orm::{entity::*, query::*, DatabaseConnection, FromQueryResult};
use uuid::Uuid;

// Run the test locally:
// DATABASE_URL="mysql://root:@localhost" cargo test --features sqlx-mysql,runtime-async-std --test sequential_op_tests
Expand Down
2 changes: 2 additions & 0 deletions tests/sql_err_tests.rs
@@ -1,3 +1,5 @@
#![allow(unused_imports, dead_code)]

pub mod common;
pub use common::{bakery_chain::*, setup::*, TestContext};
pub use sea_orm::{
Expand Down
2 changes: 2 additions & 0 deletions tests/stream_tests.rs
@@ -1,3 +1,5 @@
#![allow(unused_imports, dead_code)]

pub mod common;

pub use common::{bakery_chain::*, setup::*, TestContext};
Expand Down
2 changes: 2 additions & 0 deletions tests/string_primary_key_tests.rs
@@ -1,3 +1,5 @@
#![allow(unused_imports, dead_code)]

pub mod common;

pub use common::{features::*, setup::*, TestContext};
Expand Down
7 changes: 2 additions & 5 deletions tests/time_crate_tests.rs
@@ -1,8 +1,5 @@
#![cfg(any(
feature = "sqlx-mysql",
feature = "sqlx-sqlite",
feature = "sqlx-postgres"
))]
#![allow(unused_imports, dead_code)]

pub mod common;
pub use common::{features::*, setup::*, TestContext};
use pretty_assertions::assert_eq;
Expand Down
2 changes: 2 additions & 0 deletions tests/timestamp_tests.rs
@@ -1,3 +1,5 @@
#![allow(unused_imports, dead_code)]

pub mod common;
pub use common::{features::*, setup::*, TestContext};
use pretty_assertions::assert_eq;
Expand Down
7 changes: 2 additions & 5 deletions tests/transaction_tests.rs
@@ -1,8 +1,5 @@
#![cfg(any(
feature = "sqlx-mysql",
feature = "sqlx-sqlite",
feature = "sqlx-postgres"
))]
#![allow(unused_imports, dead_code)]

pub mod common;

pub use common::{bakery_chain::*, setup::*, TestContext};
Expand Down
2 changes: 2 additions & 0 deletions tests/type_tests.rs
@@ -1,3 +1,5 @@
#![allow(unused_imports, dead_code)]

pub mod common;

use sea_orm::{IntoActiveValue, TryFromU64, TryGetable, Value};
Expand Down
2 changes: 2 additions & 0 deletions tests/upsert_tests.rs
@@ -1,3 +1,5 @@
#![allow(unused_imports, dead_code)]

pub mod common;

pub use common::{features::*, setup::*, TestContext};
Expand Down
2 changes: 2 additions & 0 deletions tests/uuid_fmt_tests.rs
@@ -1,3 +1,5 @@
#![allow(unused_imports, dead_code)]

pub mod common;

pub use common::{features::*, setup::*, TestContext};
Expand Down
2 changes: 2 additions & 0 deletions tests/uuid_tests.rs
@@ -1,3 +1,5 @@
#![allow(unused_imports, dead_code)]

pub mod common;

pub use common::{features::*, setup::*, TestContext};
Expand Down
2 changes: 2 additions & 0 deletions tests/value_type_tests.rs
@@ -1,3 +1,5 @@
#![allow(unused_imports, dead_code)]

pub mod common;

use std::sync::Arc;
Expand Down

0 comments on commit aa626fc

Please sign in to comment.