From 16021d2985ea5765c8c5714eea5c76759db6e3ef Mon Sep 17 00:00:00 2001 From: Steven Fackler Date: Sat, 30 Mar 2019 20:58:01 -0700 Subject: [PATCH] Fix docs --- postgres/src/copy_out_reader.rs | 2 +- postgres/src/lib.rs | 3 ++- postgres/src/transaction.rs | 10 +++++----- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/postgres/src/copy_out_reader.rs b/postgres/src/copy_out_reader.rs index b5a92aac..ff0c30a2 100644 --- a/postgres/src/copy_out_reader.rs +++ b/postgres/src/copy_out_reader.rs @@ -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, cur: Cursor, diff --git a/postgres/src/lib.rs b/postgres/src/lib.rs index 112b1082..1555cb05 100644 --- a/postgres/src/lib.rs +++ b/postgres/src/lib.rs @@ -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; diff --git a/postgres/src/transaction.rs b/postgres/src/transaction.rs index 67b3def3..8850baee 100644 --- a/postgres/src/transaction.rs +++ b/postgres/src/transaction.rs @@ -66,17 +66,17 @@ impl<'a> Transaction<'a> { Ok(()) } - //// Like `Client::prepare`. + /// Like `Client::prepare`. pub fn prepare(&mut self, query: &str) -> Result { self.client.prepare(query) } - //// Like `Client::prepare_typed`. + /// Like `Client::prepare_typed`. pub fn prepare_typed(&mut self, query: &str, types: &[Type]) -> Result { self.client.prepare_typed(query, types) } - //// Like `Client::execute`. + /// Like `Client::execute`. pub fn execute(&mut self, query: &T, params: &[&dyn ToSql]) -> Result 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(&mut self, query: &T, params: &[&dyn ToSql]) -> Result, 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( &mut self, query: &T,