resolved a TODO: map_err to inspect error (#4271)

Co-authored-by: Tobie Morgan Hitchcock <tobie@surrealdb.com>
This commit is contained in:
유정인 2024-07-18 19:04:12 +09:00 committed by GitHub
parent febca6464a
commit 6a5dca9214
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -426,11 +426,9 @@ impl<'a> Executor<'a> {
let res = Response { let res = Response {
// Get the statement end time // Get the statement end time
time: now.elapsed(), time: now.elapsed(),
// TODO: Replace with `inspect_err` once stable. result: res.inspect_err(|_| {
result: res.map_err(|e| {
// Mark the error. // Mark the error.
self.err = true; self.err = true;
e
}), }),
query_type: match (is_stm_live, is_stm_kill) { query_type: match (is_stm_live, is_stm_kill) {
(true, _) => QueryType::Live, (true, _) => QueryType::Live,