Skip to content

Commit

Permalink
Fix clippy warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
billy1624 committed Aug 10, 2021
1 parent da2fd92 commit b1d28db
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions sea-orm-codegen/src/entity/column.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ impl Column {
}

pub fn get_rs_type(&self) -> TokenStream {
#[allow(unreachable_patterns)]
let ident: TokenStream = match self.col_type {
ColumnType::Char(_)
| ColumnType::String(_)
Expand Down
2 changes: 2 additions & 0 deletions src/driver/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ pub trait MockDatabaseTrait: Send {
}

impl MockDatabaseConnector {
#[allow(unused_variables)]
pub fn accepts(string: &str) -> bool {
#[cfg(feature = "sqlx-mysql")]
if crate::SqlxMySqlConnector::accepts(string) {
Expand All @@ -41,6 +42,7 @@ impl MockDatabaseConnector {
false
}

#[allow(unused_variables)]
pub async fn connect(string: &str) -> Result<DatabaseConnection, DbErr> {
macro_rules! connect_mock_db {
( $syntax: expr ) => {
Expand Down
1 change: 1 addition & 0 deletions src/entity/column.rs
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,7 @@ impl From<ColumnType> for sea_query::ColumnType {

impl From<sea_query::ColumnType> for ColumnType {
fn from(col_type: sea_query::ColumnType) -> Self {
#[allow(unreachable_patterns)]
match col_type {
sea_query::ColumnType::Char(s) => Self::Char(s),
sea_query::ColumnType::String(s) => Self::String(s),
Expand Down

0 comments on commit b1d28db

Please sign in to comment.