1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94
|
--- a/src/body/incoming.rs
+++ b/src/body/incoming.rs
@@ -107,2 +107,3 @@
#[cfg(test)]
+ #[cfg(all(feature = "http1", any(feature = "client", feature = "server")))]
pub(crate) fn channel() -> (Sender, Incoming) {
@@ -481,3 +482,4 @@
- assert_eq!(
+ #[cfg(all(feature = "http1", any(feature = "client", feature = "server")))]
+ { assert_eq!(
mem::size_of::<Sender>(),
@@ -485,5 +487,6 @@
"Sender"
- );
+ ); }
- assert_eq!(
+ #[cfg(all(feature = "http1", any(feature = "client", feature = "server")))]
+ { assert_eq!(
mem::size_of::<Sender>(),
@@ -491,3 +494,3 @@
"Option<Sender>"
- );
+ ); }
}
@@ -504,5 +507,7 @@
+ #[cfg(all(feature = "http1", any(feature = "client", feature = "server")))]
eq(Incoming::channel().1, SizeHint::new(), "channel");
- eq(
+ #[cfg(all(any(feature = "http1", feature = "http2"), any(feature = "client", feature = "server")))]
+ { eq(
Incoming::new_channel(DecodedLength::new(4), /*wanter =*/ false).1,
@@ -510,3 +515,3 @@
"channel with length",
- );
+ ); }
}
@@ -515,2 +520,3 @@
#[tokio::test]
+ #[cfg(all(feature = "http1", any(feature = "client", feature = "server")))]
async fn channel_abort() {
@@ -526,2 +532,3 @@
#[tokio::test]
+ #[cfg(all(feature = "http1", any(feature = "client", feature = "server")))]
async fn channel_abort_when_buffer_is_full() {
@@ -546,4 +553,4 @@
- #[cfg(feature = "http1")]
#[test]
+ #[cfg(all(feature = "http1", any(feature = "client", feature = "server")))]
fn channel_buffers_one() {
@@ -560,2 +567,3 @@
#[tokio::test]
+ #[cfg(all(feature = "http1", any(feature = "client", feature = "server")))]
async fn channel_empty() {
@@ -567,2 +575,3 @@
#[test]
+ #[cfg(all(feature = "http1", any(feature = "client", feature = "server")))]
fn channel_ready() {
@@ -576,2 +585,3 @@
#[test]
+ #[cfg(all(feature = "http1", any(feature = "client", feature = "server")))]
fn channel_wanter() {
@@ -598,2 +608,3 @@
#[test]
+ #[cfg(all(feature = "http1", any(feature = "client", feature = "server")))]
fn channel_notices_closure() {
--- a/src/rt/timer.rs
+++ b/src/rt/timer.rs
@@ -3,3 +3,3 @@
//! Example using tokio timer:
-//! ```rust
+//! ```rust,ignore
//! use std::{
--- a/src/error.rs
+++ b/src/error.rs
@@ -631,3 +631,3 @@
- #[cfg(feature = "http2")]
+ #[cfg(all(feature = "http2", feature = "client"))]
#[test]
@@ -638,3 +638,3 @@
- #[cfg(feature = "http2")]
+ #[cfg(all(feature = "http2", feature = "client"))]
#[test]
@@ -645,3 +645,3 @@
- #[cfg(feature = "http2")]
+ #[cfg(all(feature = "http2", feature = "client"))]
#[test]
|