rustfmt
This commit is contained in:
parent
5c33bf8b30
commit
0c84ed9f82
@ -384,10 +384,7 @@ impl Client {
|
||||
/// # Panics
|
||||
///
|
||||
/// Panics if the statement contains parameters.
|
||||
pub async fn copy_in<T, U>(
|
||||
&self,
|
||||
statement: &T,
|
||||
) -> Result<CopyInSink<U>, Error>
|
||||
pub async fn copy_in<T, U>(&self, statement: &T) -> Result<CopyInSink<U>, Error>
|
||||
where
|
||||
T: ?Sized + ToStatement,
|
||||
U: Buf + 'static + Send,
|
||||
@ -403,10 +400,7 @@ impl Client {
|
||||
/// # Panics
|
||||
///
|
||||
/// Panics if the statement contains parameters.
|
||||
pub async fn copy_out<T>(
|
||||
&self,
|
||||
statement: &T,
|
||||
) -> Result<CopyOutStream, Error>
|
||||
pub async fn copy_out<T>(&self, statement: &T) -> Result<CopyOutStream, Error>
|
||||
where
|
||||
T: ?Sized + ToStatement,
|
||||
{
|
||||
|
@ -1,7 +1,7 @@
|
||||
use crate::client::{InnerClient, Responses};
|
||||
use crate::codec::FrontendMessage;
|
||||
use crate::connection::RequestMessages;
|
||||
use crate::{query, Error, Statement, slice_iter};
|
||||
use crate::{query, slice_iter, Error, Statement};
|
||||
use bytes::buf::BufExt;
|
||||
use bytes::{Buf, BufMut, BytesMut};
|
||||
use futures::channel::mpsc;
|
||||
@ -195,10 +195,7 @@ where
|
||||
}
|
||||
}
|
||||
|
||||
pub async fn copy_in<T>(
|
||||
client: &InnerClient,
|
||||
statement: Statement,
|
||||
) -> Result<CopyInSink<T>, Error>
|
||||
pub async fn copy_in<T>(client: &InnerClient, statement: Statement) -> Result<CopyInSink<T>, Error>
|
||||
where
|
||||
T: Buf + 'static + Send,
|
||||
{
|
||||
|
@ -1,7 +1,7 @@
|
||||
use crate::client::{InnerClient, Responses};
|
||||
use crate::codec::FrontendMessage;
|
||||
use crate::connection::RequestMessages;
|
||||
use crate::{query, Error, Statement, slice_iter};
|
||||
use crate::{query, slice_iter, Error, Statement};
|
||||
use bytes::Bytes;
|
||||
use futures::{ready, Stream};
|
||||
use pin_project_lite::pin_project;
|
||||
@ -10,10 +10,7 @@ use std::marker::PhantomPinned;
|
||||
use std::pin::Pin;
|
||||
use std::task::{Context, Poll};
|
||||
|
||||
pub async fn copy_out(
|
||||
client: &InnerClient,
|
||||
statement: Statement,
|
||||
) -> Result<CopyOutStream, Error> {
|
||||
pub async fn copy_out(client: &InnerClient, statement: Statement) -> Result<CopyOutStream, Error> {
|
||||
let buf = query::encode(client, &statement, slice_iter(&[]))?;
|
||||
let responses = start(client, buf).await?;
|
||||
Ok(CopyOutStream {
|
||||
|
@ -221,10 +221,7 @@ impl<'a> Transaction<'a> {
|
||||
}
|
||||
|
||||
/// Like `Client::copy_in`.
|
||||
pub async fn copy_in<T, U>(
|
||||
&self,
|
||||
statement: &T,
|
||||
) -> Result<CopyInSink<U>, Error>
|
||||
pub async fn copy_in<T, U>(&self, statement: &T) -> Result<CopyInSink<U>, Error>
|
||||
where
|
||||
T: ?Sized + ToStatement,
|
||||
U: Buf + 'static + Send,
|
||||
@ -233,10 +230,7 @@ impl<'a> Transaction<'a> {
|
||||
}
|
||||
|
||||
/// Like `Client::copy_out`.
|
||||
pub async fn copy_out<T>(
|
||||
&self,
|
||||
statement: &T,
|
||||
) -> Result<CopyOutStream, Error>
|
||||
pub async fn copy_out<T>(&self, statement: &T) -> Result<CopyOutStream, Error>
|
||||
where
|
||||
T: ?Sized + ToStatement,
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user