Removes redundant mut
in rpc
This commit is contained in:
parent
b49baed696
commit
dab40e832c
@ -176,7 +176,7 @@ impl<T: TimeProvider> AuthCodes<T> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// look for code
|
// look for code
|
||||||
for mut code in &mut self.codes {
|
for code in &mut self.codes {
|
||||||
if &as_token(&code.code) == hash {
|
if &as_token(&code.code) == hash {
|
||||||
code.last_used_at = Some(time::Duration::from_secs(now));
|
code.last_used_at = Some(time::Duration::from_secs(now));
|
||||||
return true;
|
return true;
|
||||||
|
@ -136,7 +136,7 @@ impl ws::RequestMiddleware for WsExtractor {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn add_security_headers(res: &mut ws::ws::Response) {
|
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-Frame-Options".into(), b"SAMEORIGIN".to_vec()));
|
||||||
headers.push(("X-XSS-Protection".into(), b"1; mode=block".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()));
|
headers.push(("X-Content-Type-Options".into(), b"nosniff".to_vec()));
|
||||||
|
Loading…
Reference in New Issue
Block a user