From 90baf7fe29f4090d5ddbf4bd82f10c291b5b6d08 Mon Sep 17 00:00:00 2001 From: Quentin Gliech Date: Wed, 12 Oct 2022 18:43:07 +0200 Subject: [PATCH] rustfmt --- crates/listener/src/proxy_protocol/v1.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/crates/listener/src/proxy_protocol/v1.rs b/crates/listener/src/proxy_protocol/v1.rs index 78654124..3329ca11 100644 --- a/crates/listener/src/proxy_protocol/v1.rs +++ b/crates/listener/src/proxy_protocol/v1.rs @@ -264,8 +264,7 @@ mod tests { #[test] fn test_parse() { let mut buf = - b"PROXY TCP4 255.255.255.255 255.255.255.255 65535 65535\r\nhello world" - .as_slice(); + b"PROXY TCP4 255.255.255.255 255.255.255.255 65535 65535\r\nhello world".as_slice(); let info = ProxyProtocolV1Info::parse(&mut buf).unwrap(); assert_eq!(buf, b"hello world"); assert!(info.is_tcp()); @@ -274,7 +273,7 @@ mod tests { assert!(info.is_ipv4()); assert!(!info.is_ipv6()); - let mut buf = + let mut buf = b"PROXY TCP6 ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff 65535 65535\r\nhello world" .as_slice(); let info = ProxyProtocolV1Info::parse(&mut buf).unwrap(); @@ -294,7 +293,7 @@ mod tests { assert!(!info.is_ipv4()); assert!(!info.is_ipv6()); - let mut buf = + let mut buf = b"PROXY UNKNOWN ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff 65535 65535\r\nhello world" .as_slice(); let info = ProxyProtocolV1Info::parse(&mut buf).unwrap();