This commit is contained in:
Steven Fackler
2019-03-30 20:58:01 -07:00
parent aa3aedda56
commit 16021d2985
3 changed files with 8 additions and 7 deletions

View File

@@ -5,7 +5,7 @@ use std::marker::PhantomData;
use tokio_postgres::impls;
use tokio_postgres::Error;
// The reader returned by the `copy_out` method.
/// The reader returned by the `copy_out` method.
pub struct CopyOutReader<'a> {
it: stream::Wait<impls::CopyOut>,
cur: Cursor<Bytes>,

View File

@@ -1,4 +1,5 @@
#![warn(clippy::all, rust_2018_idioms)]
//!
#![warn(clippy::all, rust_2018_idioms, missing_docs)]
#[cfg(feature = "runtime")]
use lazy_static::lazy_static;

View File

@@ -66,17 +66,17 @@ impl<'a> Transaction<'a> {
Ok(())
}
//// Like `Client::prepare`.
/// Like `Client::prepare`.
pub fn prepare(&mut self, query: &str) -> Result<Statement, Error> {
self.client.prepare(query)
}
//// Like `Client::prepare_typed`.
/// Like `Client::prepare_typed`.
pub fn prepare_typed(&mut self, query: &str, types: &[Type]) -> Result<Statement, Error> {
self.client.prepare_typed(query, types)
}
//// Like `Client::execute`.
/// Like `Client::execute`.
pub fn execute<T>(&mut self, query: &T, params: &[&dyn ToSql]) -> Result<u64, Error>
where
T: ?Sized + ToStatement,
@@ -84,7 +84,7 @@ impl<'a> Transaction<'a> {
self.client.execute(query, params)
}
//// Like `Client::query`.
/// Like `Client::query`.
pub fn query<T>(&mut self, query: &T, params: &[&dyn ToSql]) -> Result<Vec<Row>, Error>
where
T: ?Sized + ToStatement,
@@ -92,7 +92,7 @@ impl<'a> Transaction<'a> {
self.client.query(query, params)
}
//// Like `Client::query_iter`.
/// Like `Client::query_iter`.
pub fn query_iter<T>(
&mut self,
query: &T,