Skip to content

Commit

Permalink
*: Remove warnings when compiling without default features (#2692)
Browse files Browse the repository at this point in the history
* Remove unused import in rendezvous tests

* Expand uds-transport conditionals to include features

In case neither the tokio nor the async-std feature is defined,
this file needs to be empty to avoid unused code warnings.

Co-authored-by: Max Inden <mail@max-inden.de>
  • Loading branch information
thomaseizinger and mxinden committed Jun 8, 2022
1 parent 2acbb45 commit 0bce7f7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
1 change: 0 additions & 1 deletion protocols/rendezvous/tests/harness.rs
Expand Up @@ -22,7 +22,6 @@ use async_trait::async_trait;
use futures::stream::FusedStream;
use futures::StreamExt;
use futures::{future, Stream};
use libp2p::core::muxing::StreamMuxerBox;
use libp2p::core::transport::upgrade::Version;
use libp2p::core::transport::MemoryTransport;
use libp2p::core::upgrade::SelectUpgrade;
Expand Down
6 changes: 5 additions & 1 deletion transports/uds/src/lib.rs
Expand Up @@ -31,7 +31,11 @@
//! The `UdsConfig` structs implements the `Transport` trait of the `core` library. See the
//! documentation of `core` and of libp2p in general to learn how to use the `Transport` trait.

#![cfg(all(unix, not(target_os = "emscripten")))]
#![cfg(all(
unix,
not(target_os = "emscripten"),
any(feature = "tokio", feature = "async-std")
))]
#![cfg_attr(docsrs, doc(cfg(all(unix, not(target_os = "emscripten")))))]

use futures::stream::BoxStream;
Expand Down

0 comments on commit 0bce7f7

Please sign in to comment.