mirror of
https://github.com/launchbadge/sqlx
synced 2024-09-20 22:31:56 +00:00
Resolve PR comments
This commit is contained in:
parent
ea03fa47e7
commit
7d3772e23b
6 changed files with 4 additions and 8 deletions
|
@ -114,19 +114,16 @@ impl AsyncWrite for MaybeTlsStream {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(feature = "runtime-async-std")]
|
#[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<()>> {
|
fn poll_close(mut self: Pin<&mut Self>, cx: &mut Context) -> Poll<io::Result<()>> {
|
||||||
forward_pin!(self.poll_close(cx))
|
forward_pin!(self.poll_close(cx))
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(feature = "runtime-tokio")]
|
#[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<()>> {
|
fn poll_shutdown(mut self: Pin<&mut Self>, cx: &mut Context) -> Poll<io::Result<()>> {
|
||||||
forward_pin!(self.poll_shutdown(cx))
|
forward_pin!(self.poll_shutdown(cx))
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(feature = "runtime-async-std")]
|
#[cfg(feature = "runtime-async-std")]
|
||||||
#[cfg_attr(docsrs, doc(cfg(feature = "runtime-async-std")))]
|
|
||||||
fn poll_write_vectored(
|
fn poll_write_vectored(
|
||||||
mut self: Pin<&mut Self>,
|
mut self: Pin<&mut Self>,
|
||||||
cx: &mut Context,
|
cx: &mut Context,
|
||||||
|
|
|
@ -445,7 +445,6 @@ impl MySqlConnection {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(feature = "tls")]
|
#[cfg(feature = "tls")]
|
||||||
#[cfg_attr(docsrs, doc(cfg(feature = "tls")))]
|
|
||||||
async fn try_ssl(
|
async fn try_ssl(
|
||||||
&mut self,
|
&mut self,
|
||||||
url: &Url,
|
url: &Url,
|
||||||
|
|
|
@ -99,7 +99,6 @@ pub struct PgConnection {
|
||||||
|
|
||||||
impl PgConnection {
|
impl PgConnection {
|
||||||
#[cfg(feature = "tls")]
|
#[cfg(feature = "tls")]
|
||||||
#[cfg_attr(docsrs, doc(cfg(feature = "tls")))]
|
|
||||||
async fn try_ssl(
|
async fn try_ssl(
|
||||||
&mut self,
|
&mut self,
|
||||||
url: &Url,
|
url: &Url,
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
#[cfg(feature = "runtime-async-std")]
|
#[cfg(feature = "runtime-async-std")]
|
||||||
#[cfg_attr(docsrs, doc(cfg(feature = "runtime-async-std")))]
|
|
||||||
pub use async_std::{
|
pub use async_std::{
|
||||||
fs,
|
fs,
|
||||||
future::timeout,
|
future::timeout,
|
||||||
|
@ -12,7 +11,6 @@ pub use async_std::{
|
||||||
};
|
};
|
||||||
|
|
||||||
#[cfg(feature = "runtime-tokio")]
|
#[cfg(feature = "runtime-tokio")]
|
||||||
#[cfg_attr(docsrs, doc(cfg(feature = "runtime-tokio")))]
|
|
||||||
pub use tokio::{
|
pub use tokio::{
|
||||||
fs,
|
fs,
|
||||||
io::{AsyncRead, AsyncReadExt, AsyncWrite, AsyncWriteExt},
|
io::{AsyncRead, AsyncReadExt, AsyncWrite, AsyncWriteExt},
|
||||||
|
|
|
@ -2,7 +2,6 @@
|
||||||
not(any(feature = "postgres", feature = "mysql")),
|
not(any(feature = "postgres", feature = "mysql")),
|
||||||
allow(dead_code, unused_macros, unused_imports)
|
allow(dead_code, unused_macros, unused_imports)
|
||||||
)]
|
)]
|
||||||
#![cfg_attr(docsrs, feature(doc_cfg))]
|
|
||||||
extern crate proc_macro;
|
extern crate proc_macro;
|
||||||
|
|
||||||
use proc_macro::TokenStream;
|
use proc_macro::TokenStream;
|
||||||
|
|
|
@ -83,6 +83,7 @@
|
||||||
/// * [query_file!] if you want to define the SQL query out-of-line,
|
/// * [query_file!] if you want to define the SQL query out-of-line,
|
||||||
/// * [query_file_as!] if you want both of the above.
|
/// * [query_file_as!] if you want both of the above.
|
||||||
#[macro_export]
|
#[macro_export]
|
||||||
|
#[cfg_attr(docsrs, doc(cfg(feature = "macros")))]
|
||||||
macro_rules! query (
|
macro_rules! query (
|
||||||
// by emitting a macro definition from our proc-macro containing the result tokens,
|
// by emitting a macro definition from our proc-macro containing the result tokens,
|
||||||
// we no longer have a need for `proc-macro-hack`
|
// we no longer have a need for `proc-macro-hack`
|
||||||
|
@ -145,6 +146,7 @@ macro_rules! query (
|
||||||
/// # fn main() {}
|
/// # fn main() {}
|
||||||
/// ```
|
/// ```
|
||||||
#[macro_export]
|
#[macro_export]
|
||||||
|
#[cfg_attr(docsrs, doc(cfg(feature = "macros")))]
|
||||||
macro_rules! query_file (
|
macro_rules! query_file (
|
||||||
($query:literal) => (#[allow(dead_code)]{
|
($query:literal) => (#[allow(dead_code)]{
|
||||||
#[macro_use]
|
#[macro_use]
|
||||||
|
@ -210,6 +212,7 @@ macro_rules! query_file (
|
||||||
/// # fn main() {}
|
/// # fn main() {}
|
||||||
/// ```
|
/// ```
|
||||||
#[macro_export]
|
#[macro_export]
|
||||||
|
#[cfg_attr(docsrs, doc(cfg(feature = "macros")))]
|
||||||
macro_rules! query_as (
|
macro_rules! query_as (
|
||||||
($out_struct:path, $query:literal) => (#[allow(dead_code)] {
|
($out_struct:path, $query:literal) => (#[allow(dead_code)] {
|
||||||
#[macro_use]
|
#[macro_use]
|
||||||
|
@ -260,6 +263,7 @@ macro_rules! query_as (
|
||||||
/// # fn main() {}
|
/// # fn main() {}
|
||||||
/// ```
|
/// ```
|
||||||
#[macro_export]
|
#[macro_export]
|
||||||
|
#[cfg_attr(docsrs, doc(cfg(feature = "macros")))]
|
||||||
macro_rules! query_file_as (
|
macro_rules! query_file_as (
|
||||||
($out_struct:path, $query:literal) => (#[allow(dead_code)] {
|
($out_struct:path, $query:literal) => (#[allow(dead_code)] {
|
||||||
#[macro_use]
|
#[macro_use]
|
||||||
|
|
Loading…
Reference in a new issue