Skip to content

Commit 0bce7f7

Browse files
*: Remove warnings when compiling without default features (#2692)
* 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 <[email protected]>
1 parent 2acbb45 commit 0bce7f7

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

protocols/rendezvous/tests/harness.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ use async_trait::async_trait;
2222
use futures::stream::FusedStream;
2323
use futures::StreamExt;
2424
use futures::{future, Stream};
25-
use libp2p::core::muxing::StreamMuxerBox;
2625
use libp2p::core::transport::upgrade::Version;
2726
use libp2p::core::transport::MemoryTransport;
2827
use libp2p::core::upgrade::SelectUpgrade;

transports/uds/src/lib.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,11 @@
3131
//! The `UdsConfig` structs implements the `Transport` trait of the `core` library. See the
3232
//! documentation of `core` and of libp2p in general to learn how to use the `Transport` trait.
3333
34-
#![cfg(all(unix, not(target_os = "emscripten")))]
34+
#![cfg(all(
35+
unix,
36+
not(target_os = "emscripten"),
37+
any(feature = "tokio", feature = "async-std")
38+
))]
3539
#![cfg_attr(docsrs, doc(cfg(all(unix, not(target_os = "emscripten")))))]
3640

3741
use futures::stream::BoxStream;

0 commit comments

Comments
 (0)