Skip to content

Commit 0c84ed9

Browse files
committed
rustfmt
1 parent 5c33bf8 commit 0c84ed9

File tree

4 files changed

+8
-26
lines changed

4 files changed

+8
-26
lines changed

tokio-postgres/src/client.rs

+2-8
Original file line numberDiff line numberDiff line change
@@ -384,10 +384,7 @@ impl Client {
384384
/// # Panics
385385
///
386386
/// Panics if the statement contains parameters.
387-
pub async fn copy_in<T, U>(
388-
&self,
389-
statement: &T,
390-
) -> Result<CopyInSink<U>, Error>
387+
pub async fn copy_in<T, U>(&self, statement: &T) -> Result<CopyInSink<U>, Error>
391388
where
392389
T: ?Sized + ToStatement,
393390
U: Buf + 'static + Send,
@@ -403,10 +400,7 @@ impl Client {
403400
/// # Panics
404401
///
405402
/// Panics if the statement contains parameters.
406-
pub async fn copy_out<T>(
407-
&self,
408-
statement: &T,
409-
) -> Result<CopyOutStream, Error>
403+
pub async fn copy_out<T>(&self, statement: &T) -> Result<CopyOutStream, Error>
410404
where
411405
T: ?Sized + ToStatement,
412406
{

tokio-postgres/src/copy_in.rs

+2-5
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use crate::client::{InnerClient, Responses};
22
use crate::codec::FrontendMessage;
33
use crate::connection::RequestMessages;
4-
use crate::{query, Error, Statement, slice_iter};
4+
use crate::{query, slice_iter, Error, Statement};
55
use bytes::buf::BufExt;
66
use bytes::{Buf, BufMut, BytesMut};
77
use futures::channel::mpsc;
@@ -195,10 +195,7 @@ where
195195
}
196196
}
197197

198-
pub async fn copy_in<T>(
199-
client: &InnerClient,
200-
statement: Statement,
201-
) -> Result<CopyInSink<T>, Error>
198+
pub async fn copy_in<T>(client: &InnerClient, statement: Statement) -> Result<CopyInSink<T>, Error>
202199
where
203200
T: Buf + 'static + Send,
204201
{

tokio-postgres/src/copy_out.rs

+2-5
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use crate::client::{InnerClient, Responses};
22
use crate::codec::FrontendMessage;
33
use crate::connection::RequestMessages;
4-
use crate::{query, Error, Statement, slice_iter};
4+
use crate::{query, slice_iter, Error, Statement};
55
use bytes::Bytes;
66
use futures::{ready, Stream};
77
use pin_project_lite::pin_project;
@@ -10,10 +10,7 @@ use std::marker::PhantomPinned;
1010
use std::pin::Pin;
1111
use std::task::{Context, Poll};
1212

13-
pub async fn copy_out(
14-
client: &InnerClient,
15-
statement: Statement,
16-
) -> Result<CopyOutStream, Error> {
13+
pub async fn copy_out(client: &InnerClient, statement: Statement) -> Result<CopyOutStream, Error> {
1714
let buf = query::encode(client, &statement, slice_iter(&[]))?;
1815
let responses = start(client, buf).await?;
1916
Ok(CopyOutStream {

tokio-postgres/src/transaction.rs

+2-8
Original file line numberDiff line numberDiff line change
@@ -221,10 +221,7 @@ impl<'a> Transaction<'a> {
221221
}
222222

223223
/// Like `Client::copy_in`.
224-
pub async fn copy_in<T, U>(
225-
&self,
226-
statement: &T,
227-
) -> Result<CopyInSink<U>, Error>
224+
pub async fn copy_in<T, U>(&self, statement: &T) -> Result<CopyInSink<U>, Error>
228225
where
229226
T: ?Sized + ToStatement,
230227
U: Buf + 'static + Send,
@@ -233,10 +230,7 @@ impl<'a> Transaction<'a> {
233230
}
234231

235232
/// Like `Client::copy_out`.
236-
pub async fn copy_out<T>(
237-
&self,
238-
statement: &T,
239-
) -> Result<CopyOutStream, Error>
233+
pub async fn copy_out<T>(&self, statement: &T) -> Result<CopyOutStream, Error>
240234
where
241235
T: ?Sized + ToStatement,
242236
{

0 commit comments

Comments
 (0)