From 368504b6e77fb1d6d067930c4f36e863e0f982ed Mon Sep 17 00:00:00 2001 From: Ran Benita Date: Tue, 10 Jul 2018 23:26:04 +0300 Subject: [PATCH] handshake: remove implied 'static warning: Constants have by default a `'static` lifetime --> src/handshake/mod.rs:113:21 | 113 | const WS_GUID: &'static [u8] = b"258EAFA5-E914-47DA-95CA-C5AB0DC85B11"; | -^^^^^^^----- help: consider removing `'static`: `&[u8]` | = note: #[warn(const_static_lifetime)] on by default = help: for further information visit https://rust-lang-nursery.github.io/rust-clippy/v0.0.212/index.html#const_static_lifetime --- src/handshake/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/handshake/mod.rs b/src/handshake/mod.rs index fcb3f78..f28445d 100644 --- a/src/handshake/mod.rs +++ b/src/handshake/mod.rs @@ -110,7 +110,7 @@ pub enum ProcessingResult { fn convert_key(input: &[u8]) -> Result { // ... field is constructed by concatenating /key/ ... // ... with the string "258EAFA5-E914-47DA-95CA-C5AB0DC85B11" (RFC 6455) - const WS_GUID: &'static [u8] = b"258EAFA5-E914-47DA-95CA-C5AB0DC85B11"; + const WS_GUID: &[u8] = b"258EAFA5-E914-47DA-95CA-C5AB0DC85B11"; let mut sha1 = Sha1::default(); sha1.input(input); sha1.input(WS_GUID);