[fix] move one use behind the cfg-flag, as it is used conditionally

This commit is contained in:
Vlad Stepanov 2020-03-01 13:44:03 +03:00
parent a3160d2bae
commit 2082ce15e5

View file

@ -1,6 +1,9 @@
use sqlx::types::chrono::{DateTime, NaiveDate, NaiveTime, Utc};
use sqlx::types::chrono::{DateTime, NaiveDate, Utc};
use sqlx::{Connection, PgConnection, Row};
#[cfg(all(feature = "chrono", not(feature = "time")))]
use sqlx::types::chrono::NaiveTime;
async fn connect() -> anyhow::Result<PgConnection> {
Ok(PgConnection::open(dotenv::var("DATABASE_URL")?).await?)
}