fix(compilation warnings) (#10649)

This commit is contained in:
Niklas Adolfsson
2019-05-13 15:10:25 +02:00
committed by GitHub
parent 42268fd1ef
commit 87699f8de0
7 changed files with 11 additions and 12 deletions

View File

@@ -113,20 +113,20 @@ pub fn request(address: &SocketAddr, request: &str) -> Response {
pub fn assert_security_headers_present(headers: &[String], port: Option<u16>) {
if port.is_none() {
assert!(
headers.iter().any(|header| header.as_str() == "X-Frame-Options: SAMEORIGIN")
headers.iter().any(|header| header.as_str() == "X-Frame-Options: SAMEORIGIN"),
"X-Frame-Options: SAMEORIGIN missing: {:?}", headers
);
}
assert!(
headers.iter().any(|header| header.as_str() == "X-XSS-Protection: 1; mode=block")
headers.iter().any(|header| header.as_str() == "X-XSS-Protection: 1; mode=block"),
"X-XSS-Protection missing: {:?}", headers
);
assert!(
headers.iter().any(|header| header.as_str() == "X-Content-Type-Options: nosniff")
headers.iter().any(|header| header.as_str() == "X-Content-Type-Options: nosniff"),
"X-Content-Type-Options missing: {:?}", headers
);
assert!(
headers.iter().any(|header| header.starts_with("Content-Security-Policy: "))
headers.iter().any(|header| header.starts_with("Content-Security-Policy: ")),
"Content-Security-Policy missing: {:?}", headers
)
}

View File

@@ -129,7 +129,7 @@ impl<P: PostSign> Future for ProspectiveSigner<P> {
.into_future());
},
WaitForPostSign => {
if let Some(mut fut) = self.post_sign_future.as_mut() {
if let Some(fut) = self.post_sign_future.as_mut() {
match fut.poll()? {
Async::Ready(item) => {
let nonce = self.ready