From 966f7ff9a85fcb133fb863ca1af709da5ed2c7fb Mon Sep 17 00:00:00 2001 From: Billy Chan Date: Tue, 28 Sep 2021 19:06:02 +0800 Subject: [PATCH] Fix clippy warning --- src/executor/update.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/executor/update.rs b/src/executor/update.rs index c6668d6b..7cb60f3e 100644 --- a/src/executor/update.rs +++ b/src/executor/update.rs @@ -73,7 +73,7 @@ where // Only Statement impl Send async fn exec_update(statement: Statement, db: &DatabaseConnection) -> Result { let result = db.execute(statement).await?; - if result.rows_affected() <= 0 { + if result.rows_affected() == 0 { return Err(DbErr::RecordNotFound( "None of the database rows are affected".to_owned(), ));