Use literal byte syntax

This commit is contained in:
Tony Garnock-Jones 2021-08-02 21:54:28 +02:00
parent 09da10b299
commit adfabadf7f
1 changed files with 1 additions and 1 deletions

View File

@ -137,7 +137,7 @@ async fn run_connection(
let mut buf = [0; 1]; // peek at the first byte to see what kind of connection to expect
let (i, o) = match stream.peek(&mut buf).await? {
1 => match buf[0] {
71 /* ASCII 'G' for "GET" */ => {
b'G' /* ASCII 'G' for "GET" */ => {
tracing::info!(protocol = display("websocket"), peer = debug(addr));
let s = tokio_tungstenite::accept_async(stream).await
.map_err(|e| std::io::Error::new(std::io::ErrorKind::Other, e))?;