Merge pull request #2926 from servo/unnecessary_parens

Fix an unnecessary_parens warning.
This commit is contained in:
Simon Sapin 2014-07-25 21:12:16 +01:00
commit ce84adaa05

View file

@ -63,7 +63,7 @@ impl CORSRequest {
// we can fetch a data URL normally. about:blank can also be fetched by XHR // we can fetch a data URL normally. about:blank can also be fetched by XHR
"http" | "https" => { "http" | "https" => {
let mut req = CORSRequest::new(referer, destination, mode, method, headers); let mut req = CORSRequest::new(referer, destination, mode, method, headers);
req.preflight_flag = (!is_simple_method(&req.method) || mode == ForcedPreflightMode); req.preflight_flag = !is_simple_method(&req.method) || mode == ForcedPreflightMode;
if req.headers.iter().all(|h| is_simple_header(&h)) { if req.headers.iter().all(|h| is_simple_header(&h)) {
req.preflight_flag = true; req.preflight_flag = true;
} }