Archived
1
0
Fork 0

chore: fix clippy warnings

This commit is contained in:
Dmitriy Pleshevskiy 2021-04-24 22:48:10 +03:00
parent 7ae5eec2c3
commit 20e00c3579
4 changed files with 5 additions and 5 deletions

View file

@ -25,7 +25,7 @@ impl DatabaseStatements for MySqlConnection {
} }
} }
impl SupportsTransactionalDDL for MySqlConnection {} impl SupportsTransactionalDdl for MySqlConnection {}
impl DatabaseConnection for MySqlConnection { impl DatabaseConnection for MySqlConnection {
fn batch_execute(&mut self, query: &str) -> StdResult<()> { fn batch_execute(&mut self, query: &str) -> StdResult<()> {

View file

@ -23,7 +23,7 @@ impl DatabaseStatements for PostgresConnection {
} }
} }
impl SupportsTransactionalDDL for PostgresConnection { impl SupportsTransactionalDdl for PostgresConnection {
#[inline] #[inline]
fn supports_transactional_ddl(&self) -> bool { fn supports_transactional_ddl(&self) -> bool {
true true

View file

@ -13,14 +13,14 @@ pub trait DatabaseStatements {
fn create_migration_table_stmt(&self) -> &'static str; fn create_migration_table_stmt(&self) -> &'static str;
} }
pub trait SupportsTransactionalDDL { pub trait SupportsTransactionalDdl {
#[inline] #[inline]
fn supports_transactional_ddl(&self) -> bool { fn supports_transactional_ddl(&self) -> bool {
false false
} }
} }
pub trait DatabaseConnection: DatabaseStatements + SupportsTransactionalDDL { pub trait DatabaseConnection: DatabaseStatements + SupportsTransactionalDdl {
fn batch_execute(&mut self, query: &str) -> StdResult<()>; fn batch_execute(&mut self, query: &str) -> StdResult<()>;
fn execute<'b>(&mut self, query: &str, params: ToSqlParams<'b>) -> StdResult<u64>; fn execute<'b>(&mut self, query: &str, params: ToSqlParams<'b>) -> StdResult<u64>;

View file

@ -9,7 +9,7 @@ pub mod prelude {
pub use super::adapter::{ToSql, ToSqlParams, TryFromSql}; pub use super::adapter::{ToSql, ToSqlParams, TryFromSql};
pub use super::connection::{ pub use super::connection::{
AnyConnection, DatabaseConnection, DatabaseStatements, OpenDatabaseConnection, AnyConnection, DatabaseConnection, DatabaseStatements, OpenDatabaseConnection,
SupportsTransactionalDDL, SupportsTransactionalDdl,
}; };
pub use super::migration::ManageMigration; pub use super::migration::ManageMigration;
pub use super::transaction::ManageTransaction; pub use super::transaction::ManageTransaction;