Skip to content

Commit b425a28

Browse files
committed
Reenable clippy and rustfmt in CI
1 parent 582f075 commit b425a28

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

.circleci/config.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,14 @@ jobs:
2828
- image: sfackler/rust-postgres-test:5
2929
steps:
3030
- checkout
31-
# - run: rustup component add rustfmt clippy
31+
- run: rustup component add rustfmt clippy
3232
- *RESTORE_REGISTRY
3333
- run: cargo generate-lockfile
3434
- *SAVE_REGISTRY
3535
- run: rustc --version > ~/rust-version
3636
- *RESTORE_DEPS
37-
# - run: cargo fmt --all -- --check
38-
# - run: cargo clippy --all --all-targets --all-features
37+
- run: cargo fmt --all -- --check
38+
- run: cargo clippy --all --all-targets --all-features
3939
- run: cargo test --all
4040
- run: cargo test --manifest-path tokio-postgres/Cargo.toml --no-default-features
4141
- run: cargo test --manifest-path tokio-postgres/Cargo.toml --all-features

postgres/src/config.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ pub use tokio_postgres::config::{ChannelBinding, SslMode, TargetSessionAttrs};
1717
use tokio_postgres::tls::{MakeTlsConnect, TlsConnect};
1818
use tokio_postgres::{Error, Socket};
1919

20+
type Spawn = dyn Fn(Pin<Box<dyn Future<Output = ()> + Send>>) + Sync + Send;
21+
2022
/// Connection configuration.
2123
///
2224
/// Configuration can be parsed from libpq-style connection strings. These strings come in two formats:
@@ -93,7 +95,7 @@ use tokio_postgres::{Error, Socket};
9395
#[derive(Clone)]
9496
pub struct Config {
9597
config: tokio_postgres::Config,
96-
spawner: Option<Arc<dyn Fn(Pin<Box<dyn Future<Output = ()> + Send>>) + Sync + Send>>,
98+
spawner: Option<Arc<Spawn>>,
9799
}
98100

99101
impl fmt::Debug for Config {

0 commit comments

Comments
 (0)