Skip to content

Commit

Permalink
Merge pull request #62 from hug-dev/fix-testing
Browse files Browse the repository at this point in the history
Fix compilation on testing feature
  • Loading branch information
hug-dev authored Jul 1, 2020
2 parents aa83d9a + aaca544 commit 22112f2
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/requests/request/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ impl Request {
Request {
header: RequestHeader::new(),
body: RequestBody::new(),
auth: RequestAuth::new(),
auth: RequestAuth::new(Vec::new()),
}
}

Expand Down
6 changes: 3 additions & 3 deletions src/requests/request/request_body.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ impl RequestBody {
/// Available for testing only.
#[cfg(feature = "testing")]
pub(super) fn new() -> RequestBody {
RequestBody { bytes: Vec::new() }
RequestBody { buffer: Vec::new() }
}

/// Read the request body from a stream, given the length of the content.
Expand Down Expand Up @@ -60,7 +60,7 @@ impl RequestBody {
///
/// Must only be used for testing purposes.
#[cfg(feature = "testing")]
pub fn _from_bytes(bytes: Vec<u8>) -> RequestBody {
RequestBody { bytes }
pub fn _from_bytes(buffer: Vec<u8>) -> RequestBody {
RequestBody { buffer }
}
}
1 change: 1 addition & 0 deletions tests/ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ git submodule update --init
# Build test #
##############
RUST_BACKTRACE=1 cargo build
RUST_BACKTRACE=1 cargo build --features testing

#################
# Static checks #
Expand Down

0 comments on commit 22112f2

Please sign in to comment.