Fix clippy warming
This commit is contained in:
parent
30ac326d5c
commit
f8f3d128fd
@ -61,21 +61,21 @@ impl Column {
|
|||||||
None => quote! { ColumnType::String(None).def() },
|
None => quote! { ColumnType::String(None).def() },
|
||||||
},
|
},
|
||||||
ColumnType::Text => quote! { ColumnType::Text.def() },
|
ColumnType::Text => quote! { ColumnType::Text.def() },
|
||||||
ColumnType::TinyInteger(s) => quote! { ColumnType::TinyInteger.def() },
|
ColumnType::TinyInteger(_) => quote! { ColumnType::TinyInteger.def() },
|
||||||
ColumnType::SmallInteger(s) => quote! { ColumnType::SmallInteger.def() },
|
ColumnType::SmallInteger(_) => quote! { ColumnType::SmallInteger.def() },
|
||||||
ColumnType::Integer(s) => quote! { ColumnType::Integer.def() },
|
ColumnType::Integer(_) => quote! { ColumnType::Integer.def() },
|
||||||
ColumnType::BigInteger(s) => quote! { ColumnType::BigInteger.def() },
|
ColumnType::BigInteger(_) => quote! { ColumnType::BigInteger.def() },
|
||||||
ColumnType::Float(s) => quote! { ColumnType::Float.def() },
|
ColumnType::Float(_) => quote! { ColumnType::Float.def() },
|
||||||
ColumnType::Double(s) => quote! { ColumnType::Double.def() },
|
ColumnType::Double(_) => quote! { ColumnType::Double.def() },
|
||||||
ColumnType::Decimal(s) => match s {
|
ColumnType::Decimal(s) => match s {
|
||||||
Some((s1, s2)) => quote! { ColumnType::Decimal(Some((#s1, #s2))).def() },
|
Some((s1, s2)) => quote! { ColumnType::Decimal(Some((#s1, #s2))).def() },
|
||||||
None => quote! { ColumnType::Decimal(None).def() },
|
None => quote! { ColumnType::Decimal(None).def() },
|
||||||
},
|
},
|
||||||
ColumnType::DateTime(s) => quote! { ColumnType::DateTime.def() },
|
ColumnType::DateTime(_) => quote! { ColumnType::DateTime.def() },
|
||||||
ColumnType::Timestamp(s) => quote! { ColumnType::Timestamp.def() },
|
ColumnType::Timestamp(_) => quote! { ColumnType::Timestamp.def() },
|
||||||
ColumnType::Time(s) => quote! { ColumnType::Time.def() },
|
ColumnType::Time(_) => quote! { ColumnType::Time.def() },
|
||||||
ColumnType::Date => quote! { ColumnType::Date.def() },
|
ColumnType::Date => quote! { ColumnType::Date.def() },
|
||||||
ColumnType::Binary(s) => quote! { ColumnType::Binary.def() },
|
ColumnType::Binary(_) => quote! { ColumnType::Binary.def() },
|
||||||
ColumnType::Boolean => quote! { ColumnType::Boolean.def() },
|
ColumnType::Boolean => quote! { ColumnType::Boolean.def() },
|
||||||
ColumnType::Money(s) => match s {
|
ColumnType::Money(s) => match s {
|
||||||
Some((s1, s2)) => quote! { ColumnType::Money(Some((#s1, #s2))).def() },
|
Some((s1, s2)) => quote! { ColumnType::Money(Some((#s1, #s2))).def() },
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
use crate::{Column, Entity, EntityWriter, Error, PrimaryKey, Relation, RelationType};
|
use crate::{Column, Entity, EntityWriter, Error, PrimaryKey, Relation, RelationType};
|
||||||
use sea_query::TableStatement;
|
use sea_query::TableStatement;
|
||||||
use sea_schema::mysql::def::Schema;
|
use sea_schema::mysql::def::Schema;
|
||||||
use std::{collections::HashMap, mem::swap};
|
use std::collections::HashMap;
|
||||||
|
|
||||||
#[derive(Clone, Debug)]
|
#[derive(Clone, Debug)]
|
||||||
pub struct EntityTransformer {
|
pub struct EntityTransformer {
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
use crate::{error::*, ExecResult, QueryResult, Statement, Transaction};
|
use crate::{error::*, ExecResult, QueryResult, Statement};
|
||||||
use sea_query::{
|
use sea_query::{
|
||||||
MysqlQueryBuilder, PostgresQueryBuilder, QueryStatementBuilder, SchemaStatementBuilder,
|
MysqlQueryBuilder, PostgresQueryBuilder, QueryStatementBuilder, SchemaStatementBuilder,
|
||||||
SqliteQueryBuilder,
|
SqliteQueryBuilder,
|
||||||
@ -127,7 +127,7 @@ impl DatabaseConnection {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(feature = "mock")]
|
#[cfg(feature = "mock")]
|
||||||
pub fn into_transaction_log(self) -> Vec<Transaction> {
|
pub fn into_transaction_log(self) -> Vec<crate::Transaction> {
|
||||||
let mut mocker = self.as_mock_connection().get_mocker_mutex().lock().unwrap();
|
let mut mocker = self.as_mock_connection().get_mocker_mutex().lock().unwrap();
|
||||||
mocker.drain_transaction_log()
|
mocker.drain_transaction_log()
|
||||||
}
|
}
|
||||||
|
@ -19,15 +19,15 @@ impl Database {
|
|||||||
pub async fn connect(string: &str) -> Result<DatabaseConnection, DbErr> {
|
pub async fn connect(string: &str) -> Result<DatabaseConnection, DbErr> {
|
||||||
#[cfg(feature = "sqlx-mysql")]
|
#[cfg(feature = "sqlx-mysql")]
|
||||||
if crate::SqlxMySqlConnector::accepts(string) {
|
if crate::SqlxMySqlConnector::accepts(string) {
|
||||||
return Ok(crate::SqlxMySqlConnector::connect(string).await?);
|
return crate::SqlxMySqlConnector::connect(string).await;
|
||||||
}
|
}
|
||||||
#[cfg(feature = "sqlx-sqlite")]
|
#[cfg(feature = "sqlx-sqlite")]
|
||||||
if crate::SqlxSqliteConnector::accepts(string) {
|
if crate::SqlxSqliteConnector::accepts(string) {
|
||||||
return Ok(crate::SqlxSqliteConnector::connect(string).await?);
|
return crate::SqlxSqliteConnector::connect(string).await;
|
||||||
}
|
}
|
||||||
#[cfg(feature = "mock")]
|
#[cfg(feature = "mock")]
|
||||||
if crate::MockDatabaseConnector::accepts(string) {
|
if crate::MockDatabaseConnector::accepts(string) {
|
||||||
return Ok(crate::MockDatabaseConnector::connect(string).await?);
|
return crate::MockDatabaseConnector::connect(string).await;
|
||||||
}
|
}
|
||||||
Err(DbErr::Conn)
|
Err(DbErr::Conn)
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user