1
0
mirror of https://github.com/fafhrd91/actix-web synced 2025-09-02 01:31:57 +02:00

rust 1.64 clippy run (#2891)

This commit is contained in:
Rob Ede
2022-09-25 20:54:17 +01:00
committed by GitHub
parent 172c4c7a0a
commit cc7145d41d
24 changed files with 58 additions and 67 deletions

View File

@@ -97,7 +97,7 @@ where
type Target = ConnectionPoolInnerPriv<Io>;
fn deref(&self) -> &Self::Target {
&*self.0
&self.0
}
}

View File

@@ -321,7 +321,7 @@ impl WebsocketsRequest {
// Generate a random key for the `Sec-WebSocket-Key` header which is a base64-encoded
// (see RFC 4648 §4) value that, when decoded, is 16 bytes in length (RFC 6455 §1.3).
let sec_key: [u8; 16] = rand::random();
let key = base64::encode(&sec_key);
let key = base64::encode(sec_key);
self.head.headers.insert(
header::SEC_WEBSOCKET_KEY,
@@ -513,7 +513,7 @@ mod tests {
.origin("test-origin")
.max_frame_size(100)
.server_mode()
.protocols(&["v1", "v2"])
.protocols(["v1", "v2"])
.set_header_if_none(header::CONTENT_TYPE, "json")
.set_header_if_none(header::CONTENT_TYPE, "text")
.cookie(Cookie::build("cookie1", "value1").finish());