use assert2::{assert, let_assert}; use temp_postgres::TempPostgres; #[tokio::main] async fn main() { let_assert!(Ok(postgres) = TempPostgres::new().await); println!("Temporary directory: {}", postgres.directory().display()); let_assert!(Ok(client) = postgres.client().await); assert!(let Ok(0) = client.execute("CREATE TABLE pets (name TEXT PRIMARY KEY, species TEXT)", &[]).await); assert!(let Ok(()) = postgres.kill_and_clean().await); }