Resolve PR comments

This commit is contained in:
Jane Lusby 2020-01-22 20:49:22 -08:00
parent ea03fa47e7
commit 7d3772e23b
6 changed files with 4 additions and 8 deletions

View file

@ -114,19 +114,16 @@ impl AsyncWrite for MaybeTlsStream {
}
#[cfg(feature = "runtime-async-std")]
#[cfg_attr(docsrs, doc(cfg(feature = "runtime-async-std")))]
fn poll_close(mut self: Pin<&mut Self>, cx: &mut Context) -> Poll<io::Result<()>> {
forward_pin!(self.poll_close(cx))
}
#[cfg(feature = "runtime-tokio")]
#[cfg_attr(docsrs, doc(cfg(feature = "runtime-tokio")))]
fn poll_shutdown(mut self: Pin<&mut Self>, cx: &mut Context) -> Poll<io::Result<()>> {
forward_pin!(self.poll_shutdown(cx))
}
#[cfg(feature = "runtime-async-std")]
#[cfg_attr(docsrs, doc(cfg(feature = "runtime-async-std")))]
fn poll_write_vectored(
mut self: Pin<&mut Self>,
cx: &mut Context,

View file

@ -445,7 +445,6 @@ impl MySqlConnection {
}
#[cfg(feature = "tls")]
#[cfg_attr(docsrs, doc(cfg(feature = "tls")))]
async fn try_ssl(
&mut self,
url: &Url,

View file

@ -99,7 +99,6 @@ pub struct PgConnection {
impl PgConnection {
#[cfg(feature = "tls")]
#[cfg_attr(docsrs, doc(cfg(feature = "tls")))]
async fn try_ssl(
&mut self,
url: &Url,

View file

@ -1,5 +1,4 @@
#[cfg(feature = "runtime-async-std")]
#[cfg_attr(docsrs, doc(cfg(feature = "runtime-async-std")))]
pub use async_std::{
fs,
future::timeout,
@ -12,7 +11,6 @@ pub use async_std::{
};
#[cfg(feature = "runtime-tokio")]
#[cfg_attr(docsrs, doc(cfg(feature = "runtime-tokio")))]
pub use tokio::{
fs,
io::{AsyncRead, AsyncReadExt, AsyncWrite, AsyncWriteExt},

View file

@ -2,7 +2,6 @@
not(any(feature = "postgres", feature = "mysql")),
allow(dead_code, unused_macros, unused_imports)
)]
#![cfg_attr(docsrs, feature(doc_cfg))]
extern crate proc_macro;
use proc_macro::TokenStream;

View file

@ -83,6 +83,7 @@
/// * [query_file!] if you want to define the SQL query out-of-line,
/// * [query_file_as!] if you want both of the above.
#[macro_export]
#[cfg_attr(docsrs, doc(cfg(feature = "macros")))]
macro_rules! query (
// by emitting a macro definition from our proc-macro containing the result tokens,
// we no longer have a need for `proc-macro-hack`
@ -145,6 +146,7 @@ macro_rules! query (
/// # fn main() {}
/// ```
#[macro_export]
#[cfg_attr(docsrs, doc(cfg(feature = "macros")))]
macro_rules! query_file (
($query:literal) => (#[allow(dead_code)]{
#[macro_use]
@ -210,6 +212,7 @@ macro_rules! query_file (
/// # fn main() {}
/// ```
#[macro_export]
#[cfg_attr(docsrs, doc(cfg(feature = "macros")))]
macro_rules! query_as (
($out_struct:path, $query:literal) => (#[allow(dead_code)] {
#[macro_use]
@ -260,6 +263,7 @@ macro_rules! query_as (
/// # fn main() {}
/// ```
#[macro_export]
#[cfg_attr(docsrs, doc(cfg(feature = "macros")))]
macro_rules! query_file_as (
($out_struct:path, $query:literal) => (#[allow(dead_code)] {
#[macro_use]