From dab40e832c358f7cc8967ccf815e8c5fe00a4cce Mon Sep 17 00:00:00 2001 From: Dmitry Kashitsyn Date: Sun, 15 Oct 2017 20:11:07 +0700 Subject: [PATCH] Removes redundant `mut` in rpc --- rpc/src/authcodes.rs | 2 +- rpc/src/v1/extractors.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/rpc/src/authcodes.rs b/rpc/src/authcodes.rs index c8a0731e3..f1b2a391d 100644 --- a/rpc/src/authcodes.rs +++ b/rpc/src/authcodes.rs @@ -176,7 +176,7 @@ impl AuthCodes { } // look for code - for mut code in &mut self.codes { + for code in &mut self.codes { if &as_token(&code.code) == hash { code.last_used_at = Some(time::Duration::from_secs(now)); return true; diff --git a/rpc/src/v1/extractors.rs b/rpc/src/v1/extractors.rs index a24722900..1c0fb1322 100644 --- a/rpc/src/v1/extractors.rs +++ b/rpc/src/v1/extractors.rs @@ -136,7 +136,7 @@ impl ws::RequestMiddleware for WsExtractor { } fn add_security_headers(res: &mut ws::ws::Response) { - let mut headers = res.headers_mut(); + let headers = res.headers_mut(); headers.push(("X-Frame-Options".into(), b"SAMEORIGIN".to_vec())); headers.push(("X-XSS-Protection".into(), b"1; mode=block".to_vec())); headers.push(("X-Content-Type-Options".into(), b"nosniff".to_vec()));