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()));