From 74e9382d182603af523c80af9178a52c32412cb9 Mon Sep 17 00:00:00 2001 From: Youngsuk Kim Date: Sun, 12 Apr 2020 15:27:42 -0400 Subject: [PATCH] Fix dead code issue from #488 (#583) --- src/database/postgres/insert_query_data.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/database/postgres/insert_query_data.md b/src/database/postgres/insert_query_data.md index fd83b14..44e2084 100644 --- a/src/database/postgres/insert_query_data.md +++ b/src/database/postgres/insert_query_data.md @@ -11,7 +11,7 @@ use postgres::{Connection, TlsMode, Error}; use std::collections::HashMap; struct Author { - id: i32, + _id: i32, name: String, country: String } @@ -27,7 +27,7 @@ fn main() -> Result<(), Error> { for (key, value) in &authors { let author = Author { - id: 0, + _id: 0, name: key.to_string(), country: value.to_string() }; @@ -38,7 +38,7 @@ fn main() -> Result<(), Error> { for row in &conn.query("SELECT id, name, country FROM author", &[])? { let author = Author { - id: row.get(0), + _id: row.get(0), name: row.get(1), country: row.get(2), };