Skip to content

Commit bcc6fa6

Browse files
committed
Hide tokio_postgres::client::SocketConfig behind "runtime" feature
This fixes warnings reported by rust 1.60 when doing the following: ```shell $ cargo test --manifest-path tokio-postgres/Cargo.toml --no-default-features ``` Upstream PR: sfackler#886
1 parent d3f5764 commit bcc6fa6

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

tokio-postgres/src/client.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
use crate::codec::{BackendMessages, FrontendMessage};
2-
use crate::config::{Host, SslMode};
2+
#[cfg(feature = "runtime")]
3+
use crate::config::Host;
4+
use crate::config::SslMode;
35
use crate::connection::{Request, RequestMessages};
46
use crate::copy_out::CopyOutStream;
57
use crate::query::RowStream;
@@ -25,6 +27,7 @@ use std::collections::HashMap;
2527
use std::fmt;
2628
use std::sync::Arc;
2729
use std::task::{Context, Poll};
30+
#[cfg(feature = "runtime")]
2831
use std::time::Duration;
2932
use tokio::io::{AsyncRead, AsyncWrite};
3033

@@ -145,6 +148,7 @@ impl InnerClient {
145148
}
146149
}
147150

151+
#[cfg(feature = "runtime")]
148152
#[derive(Clone)]
149153
pub(crate) struct SocketConfig {
150154
pub host: Host,

0 commit comments

Comments
 (0)