Fixing fmt on the files I changed, forgot to check prior to previous commit

This commit is contained in:
Colin Maxfield
2019-12-20 23:28:32 -05:00
parent 3592e0553e
commit e8aef6579e
3 changed files with 16 additions and 11 deletions

View File

@@ -1,4 +1,7 @@
use crate::{Config, CopyInWriter, CopyOutReader, GenericConnection, RowIter, Statement, ToStatement, Transaction};
use crate::{
Config, CopyInWriter, CopyOutReader, GenericConnection, RowIter, Statement, ToStatement,
Transaction,
};
use std::ops::{Deref, DerefMut};
use tokio::runtime::Runtime;
use tokio_postgres::tls::{MakeTlsConnect, TlsConnect};

View File

@@ -1,18 +1,18 @@
use crate::{Statement, Transaction};
use tokio_postgres::types::{ToSql};
use tokio_postgres::types::ToSql;
use tokio_postgres::{Error, Row};
/// A trait allowing abstraction over connections and transactions
pub trait GenericConnection {
/// Like `Client::execute`.
fn execute(&mut self, query: &str, params: &[&(dyn ToSql + Sync)]) -> Result<u64, Error>;
/// Like `Client::execute`.
fn execute(&mut self, query: &str, params: &[&(dyn ToSql + Sync)]) -> Result<u64, Error>;
/// Like `Client::query`.
fn query(&mut self, query: &str, params: &[&(dyn ToSql + Sync)]) -> Result<Vec<Row>, Error>;
/// Like `Client::query`.
fn query(&mut self, query: &str, params: &[&(dyn ToSql + Sync)]) -> Result<Vec<Row>, Error>;
/// Like `Client::prepare`.
fn prepare(&mut self, query: &str) -> Result<Statement, Error>;
/// Like `Client::prepare`.
fn prepare(&mut self, query: &str) -> Result<Statement, Error>;
/// Like `Client::transaction`.
fn transaction(&mut self) -> Result<Transaction<'_>, Error>;
/// Like `Client::transaction`.
fn transaction(&mut self) -> Result<Transaction<'_>, Error>;
}

View File

@@ -1,4 +1,6 @@
use crate::{CopyInWriter, CopyOutReader, GenericConnection, Portal, RowIter, Rt, Statement, ToStatement};
use crate::{
CopyInWriter, CopyOutReader, GenericConnection, Portal, RowIter, Rt, Statement, ToStatement,
};
use tokio::runtime::Runtime;
use tokio_postgres::types::{ToSql, Type};
use tokio_postgres::{Error, Row, SimpleQueryMessage};