Skip to content

Commit

Permalink
Hide tokio_postgres::client::SocketConfig behind "runtime" feature
Browse files Browse the repository at this point in the history
This fixes warnings reported by rust 1.60 when doing the following:

```shell
$ cargo test --manifest-path tokio-postgres/Cargo.toml --no-default-features
```
  • Loading branch information
funbringer committed Apr 16, 2022
1 parent 812dfa7 commit cf381ce
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tokio-postgres/src/client.rs
@@ -1,5 +1,7 @@
use crate::codec::{BackendMessages, FrontendMessage};
use crate::config::{Host, SslMode};
#[cfg(feature = "runtime")]
use crate::config::Host;
use crate::config::SslMode;
use crate::connection::{Request, RequestMessages};
use crate::copy_out::CopyOutStream;
use crate::query::RowStream;
Expand All @@ -25,6 +27,7 @@ use std::collections::HashMap;
use std::fmt;
use std::sync::Arc;
use std::task::{Context, Poll};
#[cfg(feature = "runtime")]
use std::time::Duration;
use tokio::io::{AsyncRead, AsyncWrite};

Expand Down Expand Up @@ -145,6 +148,7 @@ impl InnerClient {
}
}

#[cfg(feature = "runtime")]
#[derive(Clone)]
pub(crate) struct SocketConfig {
pub host: Host,
Expand Down

0 comments on commit cf381ce

Please sign in to comment.