Skip to content

Commit 4852645

Browse files
committed
Fix compilation when sqlx-all is enabled
1 parent 0d50b4e commit 4852645

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/crud/error.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ pub async fn test_cake_error_sqlx(db: &DbConn) {
3131
.expect_err("inserting should fail due to duplicate primary key");
3232

3333
#[cfg(any(feature = "sqlx-mysql", feature = "sqlx-sqlite"))]
34-
match error {
34+
match &error {
3535
DbErr::Exec(RuntimeErr::SqlxError(error)) => match error {
3636
Error::Database(e) => {
3737
#[cfg(feature = "sqlx-mysql")]
@@ -44,7 +44,7 @@ pub async fn test_cake_error_sqlx(db: &DbConn) {
4444
_ => panic!("Unexpected Error kind"),
4545
}
4646
#[cfg(feature = "sqlx-postgres")]
47-
match error {
47+
match &error {
4848
DbErr::Query(RuntimeErr::SqlxError(error)) => match error {
4949
Error::Database(e) => {
5050
assert_eq!(e.code().unwrap(), "23505");

0 commit comments

Comments
 (0)