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
pull/39/head
Ran Benita 7 years ago
parent 3772aaf163
commit 368504b6e7
  1. 2
      src/handshake/mod.rs

@ -110,7 +110,7 @@ pub enum ProcessingResult<Stream, FinalResult> {
fn convert_key(input: &[u8]) -> Result<String, Error> {
// ... 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);

Loading…
Cancel
Save