From 7c70445e3d0eebf5c869b142ab8820b7593ca7ad Mon Sep 17 00:00:00 2001 From: Ryan Leckey Date: Fri, 26 Jul 2019 09:20:09 -0700 Subject: [PATCH] Move main.rs to examples/postgres --- Cargo.toml | 3 +++ src/main.rs => examples/postgres.rs | 2 ++ 2 files changed, 5 insertions(+) rename src/main.rs => examples/postgres.rs (98%) diff --git a/Cargo.toml b/Cargo.toml index c8a9eb65..25a87a71 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -16,4 +16,7 @@ log = "0.4.7" md-5 = "0.8.0" memchr = "2.2.1" runtime = { version = "=0.3.0-alpha.6", default-features = false } + +[dev-dependencies] runtime-tokio = { version = "=0.3.0-alpha.5" } +env_logger = "0.6.2" diff --git a/src/main.rs b/examples/postgres.rs similarity index 98% rename from src/main.rs rename to examples/postgres.rs index f1683ba0..a7964032 100644 --- a/src/main.rs +++ b/examples/postgres.rs @@ -9,6 +9,8 @@ use std::io; #[runtime::main(runtime_tokio::Tokio)] async fn main() -> io::Result<()> { + env_logger::init(); + // Connect as postgres / postgres and DROP the sqlx__dev database // if exists and then re-create it let mut conn = Connection::establish(