Skip to content

Commit

Permalink
Compile without selecting any db backend
Browse files Browse the repository at this point in the history
  • Loading branch information
billy1624 committed Jan 28, 2022
1 parent a9092aa commit 91808ee
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/executor/execute.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ impl ExecResult {
}
#[cfg(feature = "mock")]
ExecResultHolder::Mock(result) => result.last_insert_id,
#[allow(unreachable_patterns)]
_ => unreachable!(),
}
}

Expand All @@ -60,6 +62,8 @@ impl ExecResult {
ExecResultHolder::SqlxSqlite(result) => result.rows_affected(),
#[cfg(feature = "mock")]
ExecResultHolder::Mock(result) => result.rows_affected,
#[allow(unreachable_patterns)]
_ => unreachable!(),
}
}
}
12 changes: 12 additions & 0 deletions src/executor/query.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,8 @@ impl fmt::Debug for QueryResultRow {
Self::SqlxSqlite(_) => write!(f, "QueryResultRow::SqlxSqlite cannot be inspected"),
#[cfg(feature = "mock")]
Self::Mock(row) => write!(f, "{:?}", row),
#[allow(unreachable_patterns)]
_ => unreachable!(),
}
}
}
Expand Down Expand Up @@ -124,6 +126,8 @@ macro_rules! try_getable_all {
debug_print!("{:#?}", e.to_string());
TryGetError::Null
}),
#[allow(unreachable_patterns)]
_ => unreachable!(),
}
}
}
Expand Down Expand Up @@ -160,6 +164,8 @@ macro_rules! try_getable_unsigned {
debug_print!("{:#?}", e.to_string());
TryGetError::Null
}),
#[allow(unreachable_patterns)]
_ => unreachable!(),
}
}
}
Expand Down Expand Up @@ -193,6 +199,8 @@ macro_rules! try_getable_mysql {
debug_print!("{:#?}", e.to_string());
TryGetError::Null
}),
#[allow(unreachable_patterns)]
_ => unreachable!(),
}
}
}
Expand Down Expand Up @@ -236,6 +244,8 @@ macro_rules! try_getable_date_time {
debug_print!("{:#?}", e.to_string());
TryGetError::Null
}),
#[allow(unreachable_patterns)]
_ => unreachable!(),
}
}
}
Expand Down Expand Up @@ -315,6 +325,8 @@ impl TryGetable for Decimal {
debug_print!("{:#?}", e.to_string());
TryGetError::Null
}),
#[allow(unreachable_patterns)]
_ => unreachable!(),
}
}
}
Expand Down

0 comments on commit 91808ee

Please sign in to comment.