From c7b0472fea019b46cbde03bbeb5ac79ffc97c343 Mon Sep 17 00:00:00 2001 From: vms Date: Sun, 18 Aug 2019 18:24:10 +0200 Subject: [PATCH] improve comments --- backend-rust/step2-database-only/src/database.rs | 2 +- backend-rust/step3-finished-app/src/database.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/backend-rust/step2-database-only/src/database.rs b/backend-rust/step2-database-only/src/database.rs index 4a01155..63227e1 100644 --- a/backend-rust/step2-database-only/src/database.rs +++ b/backend-rust/step2-database-only/src/database.rs @@ -4,7 +4,7 @@ use crate::sqlite; pub fn query(query: &str) -> AppResult { let response = sqlite::call(query.as_bytes()); - // Decode query result to a utf8 string + // Add more details to error message String::from_utf8(response).map_err(|e| { log::error!("unable to decode result from bytes: {:#x?}", bytes); err_msg(&format!( diff --git a/backend-rust/step3-finished-app/src/database.rs b/backend-rust/step3-finished-app/src/database.rs index 4a01155..63227e1 100644 --- a/backend-rust/step3-finished-app/src/database.rs +++ b/backend-rust/step3-finished-app/src/database.rs @@ -4,7 +4,7 @@ use crate::sqlite; pub fn query(query: &str) -> AppResult { let response = sqlite::call(query.as_bytes()); - // Decode query result to a utf8 string + // Add more details to error message String::from_utf8(response).map_err(|e| { log::error!("unable to decode result from bytes: {:#x?}", bytes); err_msg(&format!(