From 9bd537efe347cf3f585f673f2d01221db9cba9af Mon Sep 17 00:00:00 2001 From: Billy Chan Date: Mon, 27 Sep 2021 18:10:45 +0800 Subject: [PATCH] Fixup --- src/executor/insert.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/executor/insert.rs b/src/executor/insert.rs index cb7e5555..aa8905be 100644 --- a/src/executor/insert.rs +++ b/src/executor/insert.rs @@ -100,7 +100,7 @@ where .map(|col| col.to_string()) .collect::>(); let res = conn.query_one(statement).await?.unwrap(); - Some(res.try_get_many("", cols.as_ref()).unwrap_or_default()) + res.try_get_many("", cols.as_ref()).ok() } _ => { let last_insert_id = db.execute(statement).await?.last_insert_id();