Skip to content

Commit

Permalink
missed a few #[cfg(feature = "ffi")]
Browse files Browse the repository at this point in the history
This cased the CI to fail
  • Loading branch information
liamwarfield authored and Liam Warfield committed Apr 22, 2022
1 parent 720743e commit fcc9851
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 2 deletions.
3 changes: 3 additions & 0 deletions src/client/conn.rs
Expand Up @@ -560,6 +560,7 @@ impl Builder {
h1_parser_config: Default::default(),
h1_title_case_headers: false,
h1_preserve_header_case: false,
#[cfg(feature = "ffi")]
h1_preserve_header_order: false,
h1_max_buf_size: None,
#[cfg(feature = "ffi")]
Expand Down Expand Up @@ -966,9 +967,11 @@ impl Builder {
if opts.h1_title_case_headers {
conn.set_title_case_headers();
}
#[cfg(feature = "ffi")]
if opts.h1_preserve_header_case {
conn.set_preserve_header_case();
}
#[cfg(feature = "ffi")]
if opts.h1_preserve_header_order {
conn.set_preserve_header_order();
}
Expand Down
2 changes: 2 additions & 0 deletions src/ext.rs
Expand Up @@ -5,6 +5,7 @@ use http::header::HeaderName;
#[cfg(feature = "http1")]
use http::header::{IntoHeaderName, ValueIter};
use http::HeaderMap;
#[cfg(feature = "ffi")]
use std::collections::HashMap;
#[cfg(feature = "http2")]
use std::fmt;
Expand Down Expand Up @@ -123,6 +124,7 @@ impl HeaderCaseMap {
}
}

#[cfg(feature = "ffi")]
#[derive(Clone, Debug)]
/// Hashmap<Headername, numheaders with that name>
pub(crate) struct OriginalHeaderOrder {
Expand Down
2 changes: 1 addition & 1 deletion src/ffi/client.rs
Expand Up @@ -93,7 +93,7 @@ unsafe impl AsTaskType for hyper_clientconn {
ffi_fn! {
/// Creates a new set of HTTP clientconn options to be used in a handshake.
fn hyper_clientconn_options_new() -> *mut hyper_clientconn_options {
let mut builder = conn::Builder::new();
let builder = conn::Builder::new();

Box::into_raw(Box::new(hyper_clientconn_options {
builder,
Expand Down
6 changes: 5 additions & 1 deletion src/proto/h1/role.rs
Expand Up @@ -16,7 +16,9 @@ use crate::body::DecodedLength;
#[cfg(feature = "server")]
use crate::common::date;
use crate::error::Parse;
use crate::ext::{HeaderCaseMap, OriginalHeaderOrder};
use crate::ext::HeaderCaseMap;
#[cfg(feature = "ffi")]
use crate::ext::OriginalHeaderOrder;
use crate::headers;
use crate::proto::h1::{
Encode, Encoder, Http1Transaction, ParseContext, ParseResult, ParsedMessage,
Expand Down Expand Up @@ -316,6 +318,7 @@ impl Http1Transaction for Server {
extensions.insert(header_case_map);
}

#[cfg(feature = "ffi")]
if let Some(header_order) = header_order {
extensions.insert(header_order);
}
Expand Down Expand Up @@ -1043,6 +1046,7 @@ impl Http1Transaction for Client {
extensions.insert(header_case_map);
}

#[cfg(feature = "ffi")]
if let Some(header_order) = header_order {
extensions.insert(header_order);
}
Expand Down

0 comments on commit fcc9851

Please sign in to comment.