diff --git a/.circleci/config.yml b/.circleci/config.yml index 2cb94e20..3af99449 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -28,6 +28,8 @@ jobs: - image: sfackler/rust-postgres-test:5 steps: - checkout + - run: rustup component add rustfmt + - run: cargo fmt --all -- --check - *RESTORE_REGISTRY - run: cargo generate-lockfile - *SAVE_REGISTRY diff --git a/tokio-postgres/src/types/chrono_04.rs b/tokio-postgres/src/types/chrono_04.rs index 212ba6ee..91ec6a80 100644 --- a/tokio-postgres/src/types/chrono_04.rs +++ b/tokio-postgres/src/types/chrono_04.rs @@ -41,7 +41,11 @@ impl<'a> FromSql<'a> for DateTime { } impl ToSql for DateTime { - fn to_sql(&self, type_: &Type, w: &mut Vec) -> Result> { + fn to_sql( + &self, + type_: &Type, + w: &mut Vec, + ) -> Result> { self.naive_utc().to_sql(type_, w) } @@ -59,7 +63,11 @@ impl<'a> FromSql<'a> for DateTime { } impl ToSql for DateTime { - fn to_sql(&self, type_: &Type, w: &mut Vec) -> Result> { + fn to_sql( + &self, + type_: &Type, + w: &mut Vec, + ) -> Result> { self.with_timezone(&Utc).to_sql(type_, w) } @@ -80,7 +88,11 @@ impl<'a> FromSql<'a> for DateTime { } impl ToSql for DateTime { - fn to_sql(&self, type_: &Type, w: &mut Vec) -> Result> { + fn to_sql( + &self, + type_: &Type, + w: &mut Vec, + ) -> Result> { self.with_timezone(&Utc).to_sql(type_, w) }