Put stuct first since it's easier that way for the walk through.

This commit is contained in:
James Pace 2024-02-14 22:15:22 -05:00
parent e97968054d
commit b467f77a79
1 changed files with 7 additions and 7 deletions

View File

@ -1,6 +1,13 @@
use serde::{Deserialize, Serialize}; use serde::{Deserialize, Serialize};
use sqlx::{types::Json, Row}; use sqlx::{types::Json, Row};
#[derive(Serialize, Deserialize, Debug)]
struct Doc {
age: u32,
fav_color: String,
fav_movie: String,
}
#[tokio::main] #[tokio::main]
async fn main() -> anyhow::Result<()> { async fn main() -> anyhow::Result<()> {
// Connect to the database. // Connect to the database.
@ -61,10 +68,3 @@ async fn main() -> anyhow::Result<()> {
Ok(()) Ok(())
} }
#[derive(Serialize, Deserialize, Debug)]
struct Doc {
age: u32,
fav_color: String,
fav_movie: String,
}