Skip to content

Commit

Permalink
Fix build without postgres feature
Browse files Browse the repository at this point in the history
  • Loading branch information
bikeshedder committed Nov 14, 2019
1 parent 09badb4 commit b905f46
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/bin/bench_postgres.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#[tokio::main]
#[cfg(feature = "postgres")]
async fn main() {
async fn bench_postgres() {
use std::env;
use std::time::{Instant};
use deadpool::Pool;
Expand Down Expand Up @@ -50,3 +49,9 @@ async fn main() {
println!("Speedup: {}%", 100 * d1.as_millis() / d2.as_millis());
assert!(d1 > d2);
}

#[tokio::main]
async fn main() {
#[cfg(feature = "postgres")]
bench_postgres().await;
}

0 comments on commit b905f46

Please sign in to comment.