mirror of
https://github.com/launchbadge/sqlx
synced 2024-11-10 06:24:16 +00:00
[fix] move one use
behind the cfg-flag, as it is used conditionally
This commit is contained in:
parent
a3160d2bae
commit
2082ce15e5
1 changed files with 4 additions and 1 deletions
|
@ -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?)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue